This is a classic Snake Game built using vanilla JavaScript. The game allows players to control a snake and navigate it around the game board to eat food and grow longer. The objective is to achieve the highest score possible without colliding with the boundaries of the game board or the snake's own body.
- Live Demo: Play Snake Game
- Repository: GitHub
- Control the snake using arrow keys or touch buttons (for mobile devices).
- Increase your score by eating food and growing longer.
- Game over when the snake collides with the boundaries or itself.
- High score tracking to keep track of your best game.
To get started with the Snake Game, follow these steps:
- Clone the repository:
git clone https://github.com/your-username/snake-game.git
- Navigate to the project directory:
cd snake-game
- Open
index.html
in your preferred web browser.
- Use arrow keys on your keyboard to control the snake's movement.
- On mobile devices, touch the buttons displayed on the screen to control the snake's movement.
- The snake will automatically start moving when the game loads.
- Eat the food to grow longer and earn points.
- Avoid colliding with the boundaries or the snake's own body.
- The game ends when the snake collides.