A simple, yet classic Snake game developed using HTML, CSS, and JavaScript.
⭐️ If you find this project useful, consider giving it a star to show your support. ⭐
The Snake Game is a classic arcade game where the player controls a snake that moves around the game area to eat food and grows longer each time it eats. The game gets more challenging as the snake grows, and it must avoid colliding with itself or the walls.
This project implements the basic game mechanics and provides a user interface for an enjoyable gaming experience.
- Snake movement using arrow keys.
- A food item that grows the snake upon consumption.
- Score tracking system.
- Game over functionality on snake collision with itself or wall.
Follow these instructions to get a copy of the project up and running on your local machine.
Before you begin, ensure you have met the following requirements:
- Web browser (Chrome, Firefox, Safari, etc.)
- Git (optional, for cloning the repository)
No installation is required. Simply clone or download the repository and open the index.html
file in a web browser to play the game.
-
Clone the repository:
git clone https://github.com/Luv2SeeYouCry/snake-game.git
-
Open the project folder:
cd snake-game
-
Open the
index.html
file in your preferred browser.
To play the Snake Game:
- Open the index.html file in your preferred web browser.
- Use arrow keys (up, down, left, right) to control the snake.
- Collect the red food to grow the snake and earn points.
- Avoid collisions with the walls and the snake's own body.
- Have fun playing the Snake game!
- Up Arrow: Move the snake upwards.
- Down Arrow: Move the snake downwards.
- Left Arrow: Move the snake to the left.
- Right Arrow: Move the snake to the right.
- HTML5
- CSS3
- JavaScript
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or create a pull request.
This project is licensed under the MIT License. For more details, see the LICENSE file.
© 2024 Nihal Singh Chauhan. All rights reserved.