Use the arrow keys to move. Do not touch red. This is for a contest Enjoy.
Thanks to @Alolex1 for pointing out a bug. @TheCodeMaster654 for some code.