fix(render): the win screen, and a title on the door #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/title-polish"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two first-impression defects, both in
render.js. Both small, both demo-critical.1. 🏆 Winning the game said CONTAINED
Surveyor found it (3052). A won game and a lost game are both
phase: gameover. The only bit distinguishing them —won— was emitted on a transient event and never persisted, so the renderer could not branch no matter what it wanted to draw.A guest clears all 60 bricks — the payoff for the entire breaking out of Alcatraz premise — and the screen tells them they were contained. The best outcome in the game was indistinguishable from the worst, and it inverted the story it was telling.
Nobody caught it because every test, probe and autopilot plays the middle of the game. 29 unit tests, three browser probes, a 250-frame autopilot — not one walks the end state. Coverage by count is not coverage by path.
Now branches on
state.won→ BROKEN OUT, in gold (it earned the light); the loss card stays danger-red.Safe to ship AHEAD of the engine half. Engineer is persisting
state.won; until it lands,undefinedis falsy → the loss card → today exact behaviour. It lights up the moment his change arrives, with no coordination needed.2. 🚪 The game had no name
The
readyphase is the first thing every guest sees, and it was an unnamed grid (Herald 9e16). Title to his spec — 64px, 14px tracking, gold, one word — stencilled onto the wall, matching the register of the game-over card he liked.Verification
Proved by calling
render()directly with synthetic states — win vs loss vs absent:Surveyor gate clean; Engineer launch probe PASS against the real engine.
🤖 Generated with Claude Code