Welcome to the Snake Game

  • Since the Nokia cellphone was popular, the Snake Game became famous during the 20th century. This game have one player and two player mode. For the one player mode, the game will terminate when the snake's head touch itself body. For the two player mode, the game will terminate not only when one of snake's head touch itself but also the two snake touch each other.

How to run the game

1.Please download all the Java source files and picture files. 

2.Create a new folder in your desktop and name it as "SnakeGame"

3.Place all the files that your just downloaded to the folder.

4.Go to the command line. 
(For Windows user, please press Win+R keys and type "cmd" then press enter key. 
For MacOs user, please press command+space keys and type "terminal" and press enter key).

5. type "cd desktop" in command line.

6. type "cd SnakeGame" in command line.

7. type "javac TestMenu.java" in command line.

8. type "java TestMenu" in command line.

Screen Shot 2019-12-30 at 2 53 56 PM

Screen Shot 2019-12-30 at 3 43 28 PM

How to play the game

  • For one player mode, you can press "W","S","A","D" or "↑","↓","←","→" to make the snake go to up,down,left and right.

  • For two player mode, one player use "W","S","A","D" to contrl the first snake. The another player use "↑","↓","←","→" to control the second snake.

Bug and issuse

Since this projec is not fully completed yet, there is/are following bugs/issues was/were discoved 
and need to be fix in the future.
  • The game may not work ideally when screen resolution is too small. As you can see the picture in the below, the button to start game can no be displayed because the scree resolution is too small.(The game should run perfectly, if you run the game in a computer with at least 15 inch size of screen. According to the testing record, the game should run ideally at least in MacBook Pro 15 inch, MacBook Pro 16 inch, and Dell XPS 15.) 59688134793__3C0B5DA7-467C-46E2-BB5B-4D3B5307E8D8

Credit

Hing Li

Reference