A classic Snake game implementation built with vanilla HTML, CSS, and JavaScript. Control a growing snake to eat food while avoiding collisions with walls and yourself!
- Open
index.htmlin your web browser - Click the
Playbutton or pressEnterto start - Use arrow keys (
β,β,β,β) or WASD keys (W,A,S,D) on desktop or swipe on mobile to control the snake
- Guide the snake to eat the blue food blocks
- Each food item increases your score and makes the snake longer
- The game speeds up as you collect more food
- Avoid hitting the walls or the snake's own body
- Game ends when you crash - try to beat your high score!
- Works on both desktop and mobile devices
- Touch (swipe) Support for Mobile
- Progressive Difficulty: Game speed increases with score
- Real-time score display and final score on game over
- Game History: Track your past games with detailed statistics
- View all previously played games sorted by date
- See game duration, score (XP), and when each game was played
- Clear history option to reset your records
Feel free to modify the CSS file to change colors, sizes, or styling. The game grid is 21x21 cells by default and can be adjusted in the JavaScript configuration.
Enjoy the classic Snake experience! π