Skip to content

Svetlin12/Snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

Snake type badge version badge build badge language badge language version badge

Implementation of the simple but yet traditional game "Snake".

Table of contents

General information

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.

Technologies Used

  • Java
  • Visual Studio Code
  • Intellij IDEA Community Edition
  • Swing

Features

  • 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

Usage

  • Upon launching the project, the user will see a start menu with 3 options ("Start Game", "Help", "Exit"):

Start Menu

  • When the user's mouse comes closer to either one of "Start Game", "Help" or "Exit" the text will be highlighted with red color:

Start Menu hover

  • 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:

Controls

  • In order to go back to the main menu, the user needs to press on "Back" which becomes red when it is hovered on:

Controls hover

  • 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):

Game Start

  • 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:

Game

  • 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:

End Game 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:

Back To Main Menu

  • The user can exit the game via the "End Game" option:

End Game

How to run with maven

This step will show you how to run the application through the command line using mvn and java:

  1. Go to the project directory
  2. Execute mvn clean install
  3. Execute java -jar target/Snake-game-<version>.jar where <version> should be replaced with the current version of the game

Author

Svetlin Popivanov (GitHub)

About

Implementation of the classical "Snake" game.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages