A simple Snake Game built using Python and Pygame. The game offers a fun and interactive experience with a smooth snake movement and basic features like start, score display, and a game-over screen.
- Smooth Snake Movement: A snake that grows in length as it consumes food.
- Food Generation: Randomly generates food for the snake to eat.
- Score Display: Tracks your score as you play.
- Game Over Screen: Displays a message and allows the player to restart or quit.
- Main Menu: Start and Quit buttons to control the game.
- Realistic Snake Design: Snake is displayed using rounded segments instead of blocks.
Make sure you have Python installed on your system. You can download it from the official site: Python.org
You will also need the Pygame library, which you can install using pip:
pip install pygame
-
Clone the repository:
git clone https://github.com/DharshanSR/snake-game.git cd snake-game
-
Run the game:
python snake_game.py
- Arrow Keys: Control the direction of the snake.
- Q: Quit the game.
- R: Restart the game after losing.
- Python: Core programming language.
- Pygame: Used to create the game's interface and handle game logic.
To learn more about Python and Pygame, check out:
Contributions are welcome! If you'd like to improve this project, feel free to submit a pull request or open an issue.
- Fork the repository
- Create your feature branch (
git checkout -b feature/YourFeature
) - Commit your changes (
git commit -m 'Add your feature'
) - Push to the branch (
git push origin feature/YourFeature
) - Open a pull request
This project is licensed under the MIT License - see the LICENSE file for details.