[JAVA]Snake


Snake(click for animation)

After coding the Dot Rush game, I want to try other classic games, such as this one, the Snake. The code structure of my Snake implementation is quite similar with the Dot Rush, with one Game class which provides a frame and contains the nested classes that are customized menu and penal. The thing different is that the snake moves in a more "discontinuous" way than the main dot in the Dot Rush, so I implemented a velocity buffer for the snake. When multiple direction key values are input, the snake will move in a buffered way, so that player can control the snake smoothly and accurately.

GitHub: Snake
Runnable file: snake.jar