PatchHub

patchhub / snake Public

The classic snake game in your browser

README.md

Snake

The classic Snake game. It runs in your web browser from a single file and works without an internet connection.

How to play

  1. Download index.html.
  2. Double-click it. It opens in your web browser (Chrome, Firefox, Edge, Safari, etc.).
  3. Press any arrow key, or click Start, to begin.
  • Arrow keys move the snake.
  • Eat the red food to grow and score a point. The snake speeds up a little each time it eats.
  • The game ends if you hit a wall or your own tail.
  • On the Game Over screen, click Play Again or press Space or Enter to restart.
  • Press P to pause and resume.

Your best score is saved in your browser, so it's still there the next time you play.