This is a Python implementation of the classic Snake game from the Nokia 3310, using the Turtle graphics package. In this game, you control a snake that moves around the screen, eating food to grow longer. The objective is to avoid running into the walls or the snake's own body while trying to grow as long as possible.
- Classic Snake gameplay inspired by the Nokia 3310 version.
- Simple and intuitive controls using the keyboard.
- Realistic snake movement and collision detection.
- Score tracking to keep track of the highest score.
- Minimalistic graphics using the Turtle package.
To run this game, you need to have Python installed on your system. Additionally, you need the Turtle package, which is included in the standard Python library.
-
Clone or download the repository to your local machine.
-
Open a terminal and navigate to the directory containing the game files.
-
Run the game by executing the following command:
python main.py
- Move Up:
Up Arrow
key - Move Down:
Down Arrow
key - Move Left:
Left Arrow
key - Move Right:
Right Arrow
key
- The objective of the game is to eat the food that appears on the screen to grow longer.
- Avoid running into the walls or the snake's own body.
- Try to achieve the highest score possible.
The game consists of several main components:
snake_game.py
: The main script that initializes the game and runs the game loop.snake.py
: Contains the Snake class, responsible for creating and controlling the snake.food.py
: Contains the Food class, responsible for creating and placing the food on the screen.scoreboard.py
: Contains the Scoreboard class, responsible for displaying and updating the score.
If you would like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes and commit them (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
- This game was created using the Turtle graphics package, a standard Python library for creating graphics.
- Inspired by the original Snake game on the Nokia 3310.
Enjoy playing the Snake Game! Feel free to report any issues or suggest enhancements.