A retro-style, fun and addictive Snake Game built in pure Python using the curses
library!
Move fast, eat fruits, avoid walls and your own tail — old school fun, directly from your terminal.
The rules are simple:
Key | Action |
---|---|
↑ / ↓ / ← / → | Move the snake |
Eat 🍋 symbol |
Grow your snake |
Avoid | Hitting walls or yourself |
The longer you survive, the higher your score! 🍎
Level | Speed | Challenge Level |
---|---|---|
1 | Slow | 🐢 Beginner |
2 | Medium | 🚶♂️ Casual |
3 | Fast | 🏃 Intermediate |
4 | Faster | ⚡ Hard |
5 | Extreme | 💀 Snake Master |
For macOS / Linux:
python3 -m venv .venv
source .venv/bin/activate
For Windows:
python -m venv .venv
.venv\Scripts\activate
pip install windows-curses
⚠️ On Windows, you needwindows-curses
for terminal compatibility.
python pysnake.py
To deactivate the virtual environment when you're done:
deactivate
- 🐍 Classic Snake Game logic.
- 🎯 Score-based — collect as many fruits (
🍋
) as possible. - ⚡ Adjustable difficulty: choose your speed before the game starts.
- 💻 Fully terminal-based, no GUI dependencies.
- ✅ Cross-platform friendly: Windows, macOS, Linux (with
curses
).
pysnake/
├── .venv/ (optional virtual environment)
├── assets
├── .gitignore
├── pysnake.py
└── README.md
Remember:
You only deactivate the virtual environment when you're done running the project and don't need to use its dependencies anymore.
Activate ➡️ Play ➡️ Then deactivate.
Activating and immediately deactivating won't launch the game — run it first, enjoy, then exit!