Snake Game (Python, OOP, Pygame)
A simple Snake game implemented using Python, Object-Oriented Programming, and Pygame.
Requirements
- Python 3.8+
- Pygame (see
requirements.txt)
Run
- Create a virtual environment and install requirements:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt- Run the game:
python main.pyProject structure
snake.py-Snakeclassfood.py-Foodclassgame.py-Gameclass (main loop, input, update, draw)main.py- entry point
Enjoy!