CIS 120 Final Project: Snake Game

For CIS 120 (Programming Languages and Techniques I), a course I took in Spring 2021, we had to create a game of our choice using Java Swing and four core concepts we learned during the semester. I chose to create the Snake game with some additional features.

The concepts I incorporated in the implementation of my game were: 2D Arrays, Maps/Collections, Inheritance and Subtyping, and JUnit Testing.

Snake.java, Consumable.java, Board.java were all fully written by me. GameBoard.java, RunSnake.java, and Game.java were starter templates provided by the course which I altered and added code to fit the game.

Game Details

More detailed instructions can be found in a pop-up window that appears while running the game. Briefly, this is the classical Snake game with several different powerups. The objective is to grow the snake as much as you can without hitting the walls or into itself. Eating an apple increases the length of the snake by one, eating a lemon reverses its direction, and eating a peach increases its lives. When 3 of each powerup are consumed, the 333 bonus is activated and the snake gains three additional lives.

To run the game, run the Game.java file.