This is a classic Snake Game built using HTML, CSS, and JavaScript, rendered on an HTML5 canvas. The player controls the snake using arrow keys to move in four directions and collect food that appears randomly on the grid. Each time the snake eats…
This is a classic Snake Game built using HTML, CSS, and JavaScript, rendered on an HTML5 canvas. The player controls the snake using arrow keys to move in four directions and collect food that appears randomly on the grid. Each time the snake eats food, its length increases and the score is updated.
The game includes Start, Pause/Resume, and Restart controls for better interaction. The pause feature stops the game without resetting progress, while restart initializes a new session.
Collision detection is implemented so the game ends if the snake hits the wall or collides with itself. The final score is displayed at the end.
This project demonstrates core JavaScript concepts like DOM manipulation, event handling, game loops, and collision logic.
used ai for styling and idea of project and for readme , devlogs