A fun and retro Snake Game built using Python ๐ and the Turtle graphics library.
Eat the red food, grow longer, and avoid the walls (and yourself) โ how long can you last? ๐
Use the arrow keys to move the snake.
Eat the red dots ๐ to grow longer and increase your score.
Avoid the walls and your own tail. Game resets when you crash!
โ
Smooth movement using Turtle module
๐ Randomized food positioning
๐ฏ Collision detection
๐ Live score tracking with high score saving
๐ Auto-reset on collision
๐ง Clean, modular code (OOP based)
โโโ main.py # Game loop and screen setup
โโโ snake.py # Snake class with movement logic
โโโ food.py # Food object logic
โโโ scoreboard.py # Score tracking and high score saving
โโโ high_score.txt # File storing persistent high score
---
## ๐ฆ Requirements
- Python 3.x
- Turtle (usually comes pre-installed with Python)
---
## ๐ ๏ธ How to Run
1. Clone the repository:
```bash
git clone https://github.com/your-username/snake-game.git
cd snake-game