Topic 1 - Variables and Data Types
Topic 2 - Conditionals and Strings
Topic 3 - Loops
Topic 4 - Arrays
Topic 5 - File Handling
Semester 1 Projects
Topic 6 - Classes/Objects and Methods
Topic 7 - ArrayLists
Semester Projects

Introduction

You should do this project if…

  • You feel somewhat comfortable with Java and would like to explore more about classes and objects.
  • You would like to extend a simple project and add further functionality.
  • You would like some freedom in choosing what the game will do, outside of a snake eating a ball.
  • You enjoy choosing colors, fonts, shapes and sounds to improve a program.
  • You like open-ended projects that let you add your touch of creativity.
  • You like sneks.

Starter Code Files

https://github.com/emlag/SnakeLite

Introduction

You will be recreating the classic game Snake, an example of the game running can be seen below.

Get familiar with the files on the project. There are three classes, MainClass.java, Ball.java and Snakepart.java. You will need to implement each one of these to finish the game. 

Java was created so that you could create parts of a program individually. Once completed, those parts can then interact with each other to create one program. 

Most of your logic will live in the MainClass; this is your GUI class. SnakePart will contain all of the methods necessary for the snake to do its job. The Ball class will be quite simple; it will control where the ball appears and what it looks like. 

Project Setup

Possible TroubleShooting