A classic Snake game built using Python's turtle
module. Control the snake to eat food, grow longer, and avoid colliding with the walls or itself.
- Classic Snake game mechanics
- Responsive controls for moving the snake
- Score tracking and display
- Game over detection for wall and self-collision
- Clone the repository:
git clone https://github.com/vimukthiwi/snake-game.git
- Navigate to the project directory:
cd snake-game
- Ensure you have Python installed. This game requires Python 3.6+.
Run the game by executing the main.py
file:
python main.py
Up Arrow
: Move the snake upDown Arrow
: Move the snake downLeft Arrow
: Move the snake leftRight Arrow
: Move the snake right
snake-game/
├── main.py
├── snake.py
├── food.py
├── scoreboard.py
└── README.md
main.py
: The main file to run the gamesnake.py
: Contains theSnake
class responsible for snake behaviorfood.py
: Contains theFood
class responsible for food behaviorscoreboard.py
: Contains theScoreboard
class responsible for displaying the score
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Be sure to replace `https://github.com/yourusername/snake-game.git` with the actual URL of your GitHub repository and update the path to the screenshot in the `Screenshots` section. Additionally, create a `LICENSE` file in the repository if you want to include the license information.