/java-snake-game

snake game using java swing library

Primary LanguageJavaMIT LicenseMIT

Snake Game

Just a basic snake game written in java using the swing library

Hierarchy

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 ArrayListand 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...

Contributing

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.

License

MIT

"Gameplay"

image