Control the snake using arrow keys, eat food, and avoid crashing into walls or yourself — all in your terminal window!
A classic Snake game implemented in Python using the curses library — playable directly in your terminal window!
- Real-time terminal-based gameplay
- Control the snake using arrow keys
- Food spawns randomly on the screen
- Game over on wall collision or self-collision
Note: The game runs in the terminal (not GUI), so there is no graphical preview.
Make sure you have Python 3 installed.
For Windows users, you also need to install the windows-curses package:
pip install windows-curses-
Clone the repository:
git clone https://github.com/mohamedelsamin/Snake-Game.git cd Snake-Game -
Run the Python file:
python snake-game.py -
Use the arrow keys ↑ ↓ ← → to control the snake.