A terminal-based Snake game with colorful UI and high score tracking
Project description
Snake Game
A classic Snake game implemented in Python using the curses library. This terminal-based game features colorful graphics, score tracking, and an intuitive interface.
Demo
Features
- Colorful terminal-based UI
- Score and high score tracking
- Direction-aware snake appearance
- Game over screen with restart option
- Persistent high score storage
Requirements
- Python 3.6 or higher
- curses library (included in standard Python distribution)
Installation & Running
There are two ways to install and run the game:
Method 1: Using pip (Recommended)
-
Install the package:
pip install terminal-snake-game
-
Run the game:
# Either use the command-line tool snake-game # Or run as a Python module python3 -m snake_game
Method 2: From Source
-
Clone the repository:
git clone git@github.com:SwetaTanwar/snake-game.git cd snake-game
-
Run the game:
# Using Python directly python3 snake_game.py
Or make it executable first:
# Make the script executable chmod +x snake_game.py # Then run directly ./snake_game.py
How to Play
Controls
- Use arrow keys (↑ ↓ ← →) to control the snake
- Eat ★ to grow and score points
- Press 'q' to quit
- Press 'r' to restart after game over
Game Elements
- 🐍 Snake head shows direction (▶ ◀ ▲ ▼)
- ◆ Snake body
- ★ Food
- Score and high score display at the top
- Control instructions at the bottom
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file terminal_snake_game-1.0.1.tar.gz.
File metadata
- Download URL: terminal_snake_game-1.0.1.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2493d33a97826e845a033966248956ad4b4df7e3a51fec6d17ad3fffb8fe8d6c
|
|
| MD5 |
df6f85783c54eae3257984f126f807ac
|
|
| BLAKE2b-256 |
b69346ccc6e5b5cffed630da9b95f2d1b61aff7f72f7839a91fda9973d8009bc
|
File details
Details for the file terminal_snake_game-1.0.1-py3-none-any.whl.
File metadata
- Download URL: terminal_snake_game-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b25c4a242b4f10c882416acfdf0dccb2ce6139c157faa04f99abd12072ff13c
|
|
| MD5 |
1a7fde7d9d91aae704622ef4bdf652e5
|
|
| BLAKE2b-256 |
a9f5c3c6d1de93b2d6c0613db32e445f7257e30aa727ccb2f857881a579a84a2
|