A classic Snake Game built using Python's turtle graphics library.
This project demonstrates object-oriented programming, collision detection, event handling, and file I/O for high score tracking.
- Snake movement controlled with arrow keys
- Randomly generated food with different shapes and colors
- Scoreboard with persistent high score (stored in
data.txt) - Collision detection with walls and snakeโs own tail
- Modular code split across multiple files (
snake.py,food.py,scoreboard.py,main.py)
โโโ main.py # Game loop and screen setup โโโ snake.py # Snake class (movement, growth, reset) โโโ food.py # Food class (random position, shape, color) โโโ scoreboard.py # Score tracking and high score persistence โโโ data.txt # Stores high score
๐ Future Improvements Add levels with increasing speed
Introduce obstacles for more challenge
Add sound effects for gameplay feedback
Create a start menu and game-over screen