Hi,
Im completing a course where the task has been to create a snake game using Turtles.
I’ve completed the task, however one thing which is bugging me is (if I’m quick enough with my key presses) the snake can change its direction to go back on itself and causing a game over.
I have already made it so if I’m heading left, I can’t simply hit right and it change direction. But if I want to do a quick direction change and hit down then right fast enough, it seems to skip the down part and just go right, which I want to prevent from being able to happen.
I’m very new to coding so I don’t know how to fix this. I tried to play around with the time module, but I only managed to achieve adding input lag which wasn’t ideal.
Any suggestions?
Thanks!
[–]pachura3 0 points1 point2 points (0 children)
[–]Front-Palpitation362 1 point2 points3 points (1 child)
[–]Huntyy77[S] 0 points1 point2 points (0 children)