Snake Game is a classic game where the player controls a snake to eat food and grow in length. The game ends when the snake hits a wall or itself. The player's score is recorded and compared with the high score.
- Python
- Turtle Graphics
- Snake Control: The player can control the snake using the arrow keys (up, down, left, right) or the W, A, S, D keys.
- Food Collection: The snake grows when it eats food, and the player's score is updated.
- High Score Recording: The high score is saved in the
high_score.txtfile and displayed on the screen. - Game Over: The game ends when the snake hits a wall or itself, and the score is compared with the high score.
main.py: The main file to run the game.snake.py: The Snake class that manages the snake's movement and collisions.food.py: The Food class that manages the food's position.scoreboard.py: The Scoreboard class that manages the score and high score.high_score.txt: The file that stores the high score.
-
Clone the Repository
git clone https://github.com/WinterWollf/Snake.git
-
Run the Game
cd src python main.py
This project is licensed under the MIT License - see the LICENSE file for details.
For any inquiries or feedback, feel free to reach out to the project author:
- GitHub: WinterWollf
