Skip to content

Latest commit

 

History

History
42 lines (28 loc) · 1021 Bytes

README.md

File metadata and controls

42 lines (28 loc) · 1021 Bytes

Hungry Snake

image

This is a classic Snake Game implementation using Java. The game allows the player to control a snake that moves around the screen, eating food and growing longer with each food item. The player must avoid hitting the snake's own body.


Requirements

  • Java 8 or later

Execution

  1. Download or clone this repository
  2. Open the terminal and navigate to the repository directory
  3. Compile the program using the following command:
    $ javac Main.java
  4. Run the game using the following command:
    $ java Main
  5. Use the arrow keys on your keyboard to control the snake's movement
  6. Eat the food to grow longer
  7. Avoid hitting the snake's own body
  8. The game ends when the snake collides with its own body
  9. The speed will increase as your rank rises.

Demo

image