A classic Snake game implementation in HTML, JavaScript, and Canvas.
This is a simple implementation of the famous Snake game where the player controls a snake that moves around the screen. The goal is to eat apples to grow longer while avoiding collisions with the walls and the snake's own body.
- Smooth snake movement using JavaScript and Canvas
- Score tracking
- Game over detection (wall and self-collision)
- Responsive controls using arrow keys
- Simple and clean interface
- Open the
snakeGame.htmlfile in your web browser - Use the arrow keys to control the snake's direction
- Try to eat as many green apples as possible to increase your score
- Avoid hitting the walls or the snake's own body
- The game ends when the snake collides with a wall or itself
- HTML5
- JavaScript
- Canvas API
- jQuery
The game displays the score in the top-left corner and shows a "Game Over" message when the game ends.