This is a simple Snake game implemented in Python using the Pygame library.
-
Install Python 3.x on your machine if it's not already installed. You can download Python from the official website: python.org.
-
Install the Pygame library by running the following command in your terminal:
pip install pygame -
Download the
snake_game.pyfile from this repository. -
Open a terminal or command prompt and navigate to the directory where you saved
snake_game.py. -
Run the game by executing the following command:
python snake_game.py -
The game window will open, and you can start playing the Snake game.
-
Use the arrow keys to control the snake. Try to eat the food (red block) to grow longer. Avoid running into the walls or the snake's own body, as it will result in game over.
-
When the game ends, you can press "Q" to quit or "C" to play again.
- Python 3.x
- Pygame library
- The game logic and implementation were inspired by various Snake game tutorials and examples available online.
- The graphics and user interface were created using the Pygame library.
Feel free to modify and extend the game according to your needs or use it as a learning resource. If you have any questions or suggestions, please feel free to reach out or submit an issue in this repository.
Enjoy the game!