Site: https://journiql.github.io/snake_game/
How to Play
- Open
index.htmlin your web browser - Use arrow keys or WASD to move the snake
- Eat the red food to grow and earn points (+10 per food)
- Avoid hitting yourself or the walls
- 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 structurestyles.css– Styling and responsive designscript.js– Game logic and interactivitysnake.py– Original Python version (not used for web)
References
Code used: https://www.youtube.com/watch?v=BKwnOOs0ml8
