Skip to content
Based on the classic snake game
Java HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Point.java
README.md
Snake.java
SnakeGame.html
SnakeGame.java
Token.java Add files via upload Aug 7, 2019
java.policy.applet
snake-screenshot1.png
snake-screenshot2.png
snake-screenshot3.png

README.md

Snake Game

This game was created based on tutorials of the classic snake game. This program uses four classes and a Java Applet API. The user is able to control the snake to pick up tokens using the arrow keys.

Visuals

Installation

Download from Github:

  1. You will need to have JDK installed to run the program. Visit this website to find out how to download the most recent JDK for your system.
  2. Download the zip file from GitHub and unzip it.
  3. Open a command prompt and navigate to the folder that the .java files are stored in. It will probably be in the downloads folder.
  4. To compile the files, type "javac SnakeGame.java" into the command line. This will compile the files and should create .class files.
  5. To run the program, type "appletviewer SnakeGame.html" into the command line.

Play Online (not supported on mobile devices):

This game is available on my website, embedded in the HTML. If the game is visible, press anywhere in the Applet to get started. If it is not visible, your browser does not support Java Applet. You can visit this link to diagnose the problem.

If you're using Google Chrome: download the CheerpJ Applet Runner extension, which will compile the Applet to JavaScript.

You can’t perform that action at this time.