The Snake Game project recreates the well-known Snake arcade game using the Turtle graphics library in Python. Players control a snake that moves around the screen and grows longer as it consumes food. The objective is to collect as much food as possible without colliding with the walls or the snake's own body.
- Run the
main.py
script to start the Snake Game. - Use the arrow keys ("Up", "Down", "Left", "Right") to control the snake's movement.
- Guide the snake to eat the blue food dots that appear on the screen.
- Each time the snake consumes food, it grows longer.
- Colliding with the walls or the snake's own body ends the game.
- Classic Snake gameplay with user-controlled movement.
- Snake and food items are implemented using the Turtle graphics library.
- Scoreboard keeps track of the player's score and high score.
- Food items are randomly placed on the screen for variety.
main.py
: The main Python script to run the Snake Game.snake.py
: Contains the Snake class to create and control the snake's behavior.food.py
: Contains the Food class to generate and refresh food items.score.py
: Contains the Scoreboard class to track and display scores.data.txt
: A text file to store the high score.