Skip to content

thanhkowibu/Java-Snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Snake

A classic Snake game implemented in Java in order to get familiar with OOP pattern and Java language.

Installation

  1. Clone the repository:
git clone https://github.com/thanhkowibu/Java-Snake.git
cd Java-Snake
  1. Compile the source code:

Ensure you have Java installed. You can compile the code with the following command:

javac SnakeGame.java
  1. Run the game:

After compiling, run the game with:

java SnakeGame

(back to top)

How to Play

  • Controls: Use the WASD keys to move the snake up, left, down, and right.
  • Objective: Guide the snake to eat apples without hitting the walls or its own tail.
  • Scoring: The score increases each time the snake eats an apple. The game ends if the snake hits a wall or itself.
  • Try Again: Option to restart the game after losing.

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages