Skip to content

Latest commit

Β 

History

History
56 lines (42 loc) Β· 1.55 KB

File metadata and controls

56 lines (42 loc) Β· 1.55 KB

Python Escape Room

A game for learning Python concepts through six increasingly challenging puzzles. Each room presents broken code β€” fix it to unlock the door.

Setup

Requires Python 3.11+ and uv.

uv sync

Run without building

uv run app.py

Build the macOS app

Claude added the other major OSes, but was too lazy to test 🀷 ☘️

uv run build.py

Produces dist/PythonEscapeRoom.app. Drag it to Applications or double-click to play.

Rooms

# Title Concept
0a The Override Subclassing β€” override a base class method
0b The Contract Abstract base classes (ABC, @abstractmethod)
1 The Waiting Room asyncio.gather β€” run coroutines concurrently
2 The Memory Vault Generators β€” yield instead of building a list
3 The Spider's Web Async generators β€” async def + yield
4 The Final Lock Twisted DeferredQueue + gatherResults (how Scrapy works under the hood)

Project structure

app.py          β€” tkinter UI
build.py        β€” builds PythonEscapeRoom.app via PyInstaller
rooms/
  __init__.py   β€” public interface (ROOMS, Room, RunResult, run_room)
  base.py       β€” Pydantic models (Room, RunResult)
  runner.py     β€” code execution engine and AST helpers
  room_0a.py    β€” The Override
  room_0b.py    β€” The Contract
  room_1.py     β€” The Waiting Room
  room_2.py     β€” The Memory Vault
  room_3.py     β€” The Spider's Web
  room_4.py     β€” The Final Lock