JavaScript-Snake
JavaScript-Snake copied to clipboard
Wait for an arrow-key press after coming out of pause.
When coming out of pause, the game starts running right away without giving the player a chance to reorient themselves into the hectic action. It would be better if once the user has dismissed the pause box, the game game doesn't actually resume until the user then presses an arrow key.
If the arrow key is a change in direction when when the game was paused, the snake's next move should be in the new direction indicated by the player's key-press.