Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 567 Bytes

README.md

File metadata and controls

27 lines (16 loc) · 567 Bytes

snake

Snake game with Python and Pygame

Requirements

python 3 (python 3.11+ recommended)

Install

  • (optional) create virtual env python -m venv .venv
  • (optional) activate virtual env source .venv/bin/activate
  • install deps pip install --upgrade pip && pip install -r requirements.txt
  • game is ready to be played

Run game

python src/snake.py

Run tests

pytest

How to play

  • top/right/bottom/left arrow: snake advances in top/right/bottom/left direction (position updates once each frame)
  • press any key to restart if you loose