It has to be as fast as possible:
Getkey If Ans = 27 Or Ans = 38 Then (ans = 27) - (Ans = 38) --> H 0 --> V IfEnd If Ans = 37 Or Ans = 28 Then (ans = 37) - (Ans = 28) --> V 0 --> H IfEnd
I have created a snake game.
H and V mean horizontal speed and vertical speed.
I want the code to be executed as fast as possible.
Keep in account that the keys aren't pressed all the time. The code also has to work and has to do exactly the same as it does now.