A simple implementation of the classic Snake Game using the Turtle module from Python. The game features a snake that grows as it eats food, and the player must avoid colliding with the walls or the snake itself. Inspired by the classic arcade game.
- Simple gameplay
- Basic scoring system
-
Download the Project Files
- Download the ZIP file of the project from this link.
-
Extract the ZIP File
- After downloading, extract the ZIP file to a directory of your choice. This will create a folder named
snake_game-master
containing the project files.
- After downloading, extract the ZIP file to a directory of your choice. This will create a folder named
-
Check Python Installation
- To check if Python is installed on your system, open a terminal or command prompt and run:
python --version
- If Python is not installed, download and install Python from python.org. Ensure you download Python version 3.11.8 or above.
- To check if Python is installed on your system, open a terminal or command prompt and run:
-
Install Turtle Module
- The Turtle module is included with most Python distributions. If it's not installed, you can install it via pip:
pip install PythonTurtle
- The Turtle module is included with most Python distributions. If it's not installed, you can install it via pip:
-
Open Terminal or PowerShell
- On Windows, you can open Command Prompt or PowerShell by pressing
Win + R
, typingcmd
orpowershell
, and pressingEnter
.
- On Windows, you can open Command Prompt or PowerShell by pressing
-
Navigate to the Project Directory
- Use the
cd
command to change to the directory where you extracted the ZIP file. For example, if you extracted the files toC:\Users\username\Downloads\snake_game-master
, you would run:cd C:\Users\username\Downloads\snake_game-master
- Use the
-
Run the Game
- Start the game by running the following command:
python main.py
- If you encounter issues, try:
py main.py
- Start the game by running the following command:
-
Start Playing
- Use the arrow keys to control the direction of the snake.
- Eat the food (represented by a circle) to grow the snake and increase your score.
- Avoid colliding with the walls or the snake's own body.
- The game ends when the snake collides with itself or the boundaries.
This project is licensed under the Unlicense License. See the UNLICENSE file.