Snake Game

Site: https://journiql.github.io/snake_game/

How to Play


  1. Open index.html in your web browser
  2. Use arrow keys or WASD to move the snake
  3. Eat the red food to grow and earn points (+10 per food)
  4. Avoid hitting yourself or the walls
  5. Try to get the highest score!

Game Rules


  • The snake grows by 1 segment each time it eats food
  • The snake dies if it hits itself or goes off the screen (wraps around)
  • Each food item is worth 10 points
  • Game ends when the snake collides with itself

Files


  • index.html – Main HTML structure
  • styles.css – Styling and responsive design
  • script.js – Game logic and interactivity
  • snake.py – Original Python version (not used for web)

References


Code used: https://www.youtube.com/watch?v=BKwnOOs0ml8

Leave a Comment

Your email address will not be published. Required fields are marked *