Skip to content

Augustwise/snake-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐍 Snake Game

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!

How to Play

  1. Open index.html in your web browser
  2. Click the Play button or press Enter to start
  3. Use arrow keys (↑, ↓, ←, β†’) or WASD keys (W, A, S, D) on desktop or swipe on mobile to control the snake

Game Rules

  • 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!

Features

  • 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

🎨 Customization

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! 🐍

About

Snake Game built with HTML, CSS, JS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors