Implementation of the simple but yet traditional game "Snake".
The project realises the game "Snake" which for those of you who don't know is a game in which you play as a snake and move around a "box", trying to eat apples in order to enlargen yourself with each apple. The game is really simple to understand which is backed up by the "Help" menu integrated into the game's main menu. The project doesn't realise a score ladderboard.
- Java
- Visual Studio Code
- Intellij IDEA Community Edition
- Swing
- Help menu which explains the controls for the snake's movement
- The classical "Snake" game
- Score which is updated every time the snake eats an apple
- End game menu with information about your total score for the finished game
- Upon launching the project, the user will see a start menu with 3 options ("Start Game", "Help", "Exit"):
- When the user's mouse comes closer to either one of "Start Game", "Help" or "Exit" the text will be highlighted with red color:
- When the user presses on "Help", he will be taken to a separate menu which explains which controls are used in order to control the snake's movement:
- In order to go back to the main menu, the user needs to press on "Back" which becomes red when it is hovered on:
- When the user presses "Start Game", the game launches and the snake goes from the top left corner of the window to the top left one by default. At this point the user can start changing it's direction by using the designated for that purpose keys (shown in "Help" menu):
- When the snake's head reaches the position of the red dot (the apple) it gets larger and the red dot changes it's location. The more apples the snake devours, the longer it gets as shown in the picture down below:
- When the snake hits one of its own body parts or the walls the game ends leading the user to the end game menu as shown down below. On the end game menu the user can view his achieved score for that particular game and there is also an option to go back to the main menu:
- When the user presses "Back to Main Menu" option he is taken over to the main menu. That option also changes its color to green when hovered:
- The user can exit the game via the "End Game" option:
This step will show you how to run the application through the command line using mvn and java:
- Go to the project directory
- Execute
mvn clean install - Execute
java -jar target/Snake-game-<version>.jarwhere<version>should be replaced with the current version of the game
Svetlin Popivanov (GitHub)







