Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 554 Bytes

File metadata and controls

31 lines (22 loc) · 554 Bytes

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

  1. Create a virtual environment and install requirements:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
  1. Run the game:
python main.py

Project structure

  • snake.py - Snake class
  • food.py - Food class
  • game.py - Game class (main loop, input, update, draw)
  • main.py - entry point

Enjoy!