A classic Snake game built using pure JavaScript, CSS, and HTML5. This project demonstrates modular coding practices, game loop implementation, and coordinate-based collision detection.
- Smooth Movement: Frame-rate independent game loop for consistent speed.
- Dynamic Growth: Snake grows in length upon consuming food.
- Collision Logic: Detects wall hits and self-collisions.
- Clean Architecture: Divided into modules (
snake.js,food.js,input.js) for maintainability.
- HTML5 Canvas/Grid: For rendering.
- Vanilla JavaScript: No external libraries or frameworks.
- CSS3: For styling and responsive layout.
- Open
index.htmlin any modern web browser. - Use the Arrow Keys to control the snake.
- Eat the food to grow and increase your score.