Skip to content

sharath4444/snake-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Snake Game

Welcome to the Snake Game project! 🐍 This is a classic Snake game built using HTML, CSS, and JavaScript. The game features a simple but engaging gameplay where you control a snake to eat food and grow longer. Your objective is to score as high as possible without running into the walls or the snake's own body.

Features

  • Classic Snake Gameplay: Control the snake using arrow keys and try to eat the food to grow longer.
  • Score Tracking: Your current score is displayed on the screen.
  • Game Over Screen: When the game ends, see your final score and have the option to restart.
  • Name Input & History: After the game ends, enter your name to save your score. View the last 5 scores along with player names in a table.
  • Stylish UI: A clean and modern design with smooth hover effects on the header and footer.

How to Play

  1. Start the Game: The game starts automatically. Use the arrow keys (Up, Down, Left, Right) to control the snake's direction.
  2. Eat the Food: Move the snake towards the red food to increase your score.
  3. Avoid Collisions: Don't let the snake collide with the walls or itself.
  4. Game Over: When the game ends, enter your name in the provided text field to save your score.

Running the Game

To play the game locally:

  1. Clone the Repository:
    git clone https://github.com/sharath4444/snake-game.git
  2. Navigate to the Project Directory:
    cd snake-game
  3. Open index.html in Your Browser: Simply double-click the index.html file or open it in a web browser.

Deployed Version

You can play the game live here.

Contributing

Feel free to fork the repository and submit a pull request if you have suggestions for improvements or new features. Your contributions are always welcome!

Contact

If you have any questions or feedback, you can reach me at mankalasharathchandra4@gmail.com.


Enjoy the game and have fun! 🎮

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors