This repository is meant to contain our Snake Game. We had to create a Snake Game in Java with the following requirements:
- There is a superclass for all of the elements: the body, the head and the food
- There are recursive functions. These are meant to increase the productivity of the program.
- Functions make use of polymorphism. This enables us to write less code to do more.
How to use
The easiest way to compile the java files, is to run the following command from the root directory:
javac src/*.java -d build
This will put all of the compiled classes in a folder called
I want to play another mode
You can play without walls if you pass the argument
no-walls while opening the application. For example:
java Main --no-walls
This gamemode will allow you to pass through the boundaries of the game without dying. We are currently working on Battle Royale.
To see all the other flags pass the argument
--help while opening the application. You can for example also play as a gay snake.
This sucks! Why?
Because this is meant to be easily extendable. If you feel like there is something extremely basic that needs to be in this program, you are free to create a Pull Request. We strongly advise you to create an issue beforehand, to avoid doing work that we will not use.