An open API service indexing awesome lists of open source software.

https://github.com/spafic/pysnake

PySnake is a classic Snake Game implemented in Python using the Pygame library. Control a snake, eat food, avoid collisions, and strive to achieve the highest score in this nostalgic arcade experience.
https://github.com/spafic/pysnake

Last synced: about 1 year ago
JSON representation

PySnake is a classic Snake Game implemented in Python using the Pygame library. Control a snake, eat food, avoid collisions, and strive to achieve the highest score in this nostalgic arcade experience.

Awesome Lists containing this project

README

          

# PySnake 🐍

PySnake is a classic Snake Game implemented in Python using the Pygame library. Control a snake, eat food, avoid collisions, and strive to achieve the highest score in this nostalgic arcade experience. The game features intuitive controls, dynamic gameplay mechanics, and a sleek dark-themed UI for optimal visibility. Enjoy hours of fun as you navigate the snake through its journey of growth and challenge.

## Installation âš™ī¸

1. **Clone the repository:**

```bash
git clone https://github.com/Spafic/PySnake.git
cd PySnake

2. **Install dependencies:**

Make sure you have Python 3.x and Pygame installed. If not, install Pygame using pip:

```bash
pip install pygame

3. **Run the game:**

```bash
python main.py

## Controls đŸ•šī¸

Use arrow keys (`↑`, `↓`, `←`, `→`) to change the direction of the snake.

## Gameplay 🎮

- The snake starts moving in a default direction.
- Control the snake to eat the randomly appearing food.
- Each food eaten increases the snake's length and score.
- The game ends if the snake collides with its own body or the game borders.
- Click the "Play Again" button to restart the game after a game over.

## Contributing 🤝

Contributions are welcome! Fork the repository and create a pull request with your improvements.

## License 📄

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.