A simple classic Snake game written in Python using the turtle module.
You control the snake, collect food, and try not to collide with walls or yourself.
Each time you eat, your snake gets longer and your score increases!
- Smooth movement using arrow keys
- Snake grows after eating food
- Random food placement
- Collision detection (walls, self)
- Scoreboard with live updates
- Clean object-oriented design using Python classes
Snake-Game/
โ
โโโ main.py # Main game loop
โโโ snake.py # Snake class and movement logic
โโโ food.py # Food appearance and placement
โโโ score_board.py # Scoreboard display and logic
- Run the game with:
python main.py- Control the snake using arrow keys: โ Up โ Down โ Left โ Right
- Eat food to gain points.
- Avoid hitting the walls or yourself.
- The game ends when a collision occurs.
Python 3.x No external libraries required (uses built-in turtle module)