Browser co-op kitchen game: FastAPI + native WebSockets, server-authoritative 20 Hz simulation, in-memory anonymous lobbies, data-driven YAML levels, Canvas 2D vanilla ES-module client with locally authored SVG art and no external CDNs. .agents/PLAN.md records the LOCKED decisions; .agents/user_stories/ holds the 12 flow contracts; .agents/phases/todo/ breaks them into 14 sequential, test-gated phases (71 task files), each leaving the app launchable and the suite green. LLM-Generated: true
1.3 KiB
1.3 KiB
US-03 — Ready up and start from the lobby
As a host, I want to pick the level and start once everyone is ready, so that the group begins together on the same kitchen.
Acceptance criteria
- The lobby lists every seat: name, ready state, host crown, connection state.
- Any player can toggle Ready; the host can pick any unlocked level from a list showing name, target score, time limit, and difficulty pips.
- Start is enabled for the host when ≥ 1 non-host player is ready (or the host is alone — solo play is allowed).
- Starting begins a 3-2-1
countdownshown identically on all clients, then the firstsnaparrives. - Non-host players cannot start or change level; the attempt shows a disabled control (no console errors, no silent failure).
- If the host leaves in
LOBBY, host status transfers to the lowest occupied seat; inPLAYINGthe round continues. - Someone leaving during
COUNTDOWNcancels the countdown back toLOBBY. - Starting creates a round record in the in-memory session store.
E2E suite
tests/e2e/test_us03_ready_and_start.py — two contexts: ready toggles visible to
both, non-host start rejected, countdown then both screens show the kitchen.
Phases
05_anonymous_lobbies_and_room_lifecycle, 06_realtime_websocket_protocol,
07_canvas_client_and_hud