Welcome to the Snake Game repository! This repository contains a classic snake game implemented using the Pygame library in Python.
This project is a simple snake game where you control a snake that grows in length as it consumes food. The goal is to achieve the highest score possible by eating food without colliding with yourself. The game also includes a high score tracker, which saves your highest score across sessions.
Before running the game, make sure you have the following installed:
- Python 3.x
- Pygame
-
Clone the repository:
git clone https://github.com/yourusername/snake_game.git
-
Navigate to the project directory:
cd snake_game
-
Install the required dependencies:
pip install -r requirements.txt
To start the game, run the main.py
file:
python main.py
- Arrow Keys (Up, Down, Left, Right) or WASD: Control the movement of the snake.
- Space: Start or restart the game.
- Enter: Restart the game after a game over.
- G: Increase score by 10 (Cheat code).
- O: Trigger game over (Cheat code).
- V: Increase game speed (Cheat code).
- C: Decrease game speed (Cheat code).
- Classic Snake Gameplay
- High Score Tracking
- Simple but effective graphics and sound effects
- Cheat codes for testing
Contributions are welcome! If you'd like to contribute, please fork the repository, make your changes, and submit a pull request.
This project is licensed. See the LICENSE file for details.
Happy gaming!