Objective: Navigate around the map and collect apples to boost your score. Each apple collected elongates the snake by one (1) unit.
Control the snake's movement using arrow keys or WASD keys.
The game will be over once the snake hits a wall or its own tail.
Press ENTER to restart.
java 17.0.10
Make self-collision detection smoother so that pressing keys near-simultaneously won't be registered as an instantaneous overlap.