The SnakeGame is a classic game running in a JFrame application. A green snake starts in the middle of the screen, and is able to go up, down, left and right to collect the red apples. The player wins the game if the green snake fills up each cell of rows and columns, and loses the game if the snake hits a wall, or hits itself.
- Make sure you got JDK installed:
- Open up command prompt or terminal
- Type: java --version
- If you do not have openJDK, or the version is older than 11.0.16.1, upgrade to a newer version.
- Open command prompt or terminal in the main directory of the project/outside the "snakegame" folder, or cd into the folder ""SnakeGame" but not the snakegame package.
- Type: javac -d out snakegame/SnakeGame.java to compile all the package files and create .class files inside of out/snakegame folder.
- Type: java snakegame.SnakeGame to run the game
- Making an executable jar file is up to the downloader.
Since this project is open source, you may download it and use it for all types of personal work, including using personally, giving other people the files, and modifying.