Just a basic snake game written in java using the swing
library
This game is made up of several classes. First, we have the most basic class, Cube.java
. This class is essentially just draws a square on the screen. Then we have the Snake.java
class. This class groups several Cube
objects in an ArrayList
and implements basic logic for movement and collision of the snake. Finally, we have the snakeGame.java
class. This class puts everything together and implements a simple high score system while saving a high score to a .txt
file. This class also contains the main game loop and it implements collision logic with the borders of the window...
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.