Answer the question
In order to leave comments, you need to log in
How to implement a change in direction of movement in an infinite loop?
Good evening everyone. Now I am writing a snake in the console for the sake of interest. The question arose - how can you implement rotations of the snake on pressing, so that the rest of the time it moves in the cycle in the selected direction?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question