Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
Add Tea Party: the playable page and its place in the catalogue, on the rules in `tea-party/table.js` #302
Check · Review · Land · Live done — Landed and live in production.
Tea Party is playable at /tea-party/ and listed in the catalogue. I tested it with the new page tests, the scripted round, serve.test.mjs, shell.test.mjs and town.test.mjs. Last run after the rebase, those passed apart from shell.test.mjs and town.test.mjs, which I did not rerun then.
shipped production is serving it deploy ab54f53
1 earlier comment · 1 event
Tea Party is playable at /tea-party/ and listed in the catalogue. I tested it with the new page tests, the scripted round, serve.test.mjs, shell.test.mjs and town.test.mjs. Last run after the rebase, those passed apart from shell.test.mjs and town.test.mjs, which I did not rerun then. I did not run the whole bun test.
What changed
- Page:
tea-party/index.htmldraws a gingham-clothed garden table with 2–5 guests, a round teapot, a tall copper coffee pot, a milk jug, a sugar bowl and a cake stand. Guests differ by hat (top hat, boater, sun hat, bobble hat, party hat) as well as colour. While orders are shown, each guest's bubble appears in turn, using small icons for drink, milk, sugars and cake. - Serving: tap a guest, then pot, milk, sugar (each tap adds one) and cake (each tap changes it), then the guest again to serve. Tab, arrows and Enter do the same; Tab leaves the canvas at either end.
- Rules and HUD: the page drives the game only through
tea-party/table.js. The HUD shows round, guests, score, wrong parts, perfect cups, best score and the cup being poured. Every move, and each order as it is shown, goes to the aria-live status. - Visual rules: 360x280 canvas, fixed camera, hard shadows screen-right. Grass and tree sway stops under
prefers-reduced-motion, there is a#mutebutton, no.mp3, and the rules popup is four lines. The page repaints only when something changed, so the scripted round costs about 1.3 s. - Catalogue:
shell.jshas theGAMESentry exactly as specified, theindex.html<li>, the README Games table row and the without-music list. The town draws its building fromGAMES, sotown.jsneeded no edit.bun scripts/og.mjshas been run. - Tests:
rounds.mjshas a scripted round that serves all 14 guests perfectly and reaches the win line.serve.test.mjsasserts/tea-party/and/tea-party/table.jsanswer 200.tea-party/page.test.mjsis new and has 7 tests covering the bubbles in turn, serving by taps and by keys, an unfinished cup, losing and restarting, mute, and page-source checks.
Things to know
- A serve that clears a round starts the next one with
last: null. The page then works out how that cup went from the score and perfect-count change, usingM.PART_POINTSandM.PERFECT_BONUS. A small change intable.jsto keeplastwould be cleaner; I left the rules alone. - Pots and milk cast no shadow onto the cloth except a darker patch I paint by hand. Guests and the table do cast engine shadows onto the ground.
- The scene looks small on the canvas. That is the engine's fixed scale, so I tightened the seating instead of changing it.
scripts/gate.ts,scripts/fast.tsandscripts/design-lint.tsdo not exist in this repository, so none ran.bun x tsc --noEmitonly printed usage because there is no tsconfig.
To try it: open /tea-party/, listen to the bubbles, then serve from memory. Locally, bun test tea-party and bun test playtest.test.mjs -t tea-party cover it.
🤖 Generated with Claude Code
Playable and wired in: /tea-party/ and /tea-party/table.js answer 200 on the preview, and shell/town/tea-party tests pass here. I could not open the screenshots (outside my sandbox), so the phone layout is unchecked. One round of cleanups, all in tea-party/index.html, under the Clean rule:
- Dead state:
G.heardis set in the G literal and inbegin()but never read. Remove it. PINK_RGB()returns a literal that duplicates thePINK/CLOTH_Apalette style and is called once in bakeItems, with a name that looks like a constant. Replace it with an inline[201, 138, 160]or a named const, and delete the function.- In serveGuest the page reconstructs
matchedfrom score deltas using M.PART_POINTS and M.PERFECT_BONUS because the rules droplaston a round-clearing serve. That is a game rule duplicated in the page, against "adds no game rule of its own". Make table.js keeplast(with a test in table.test.mjs) and read it, or at least derive nothing from the constants. - Please check the 7-row #scores block at 360px: it is position:fixed over the top-left of the canvas and may cover the first guests bubble on a phone. If it does, fold it into one or two lines.
Tick status: boxes 1-4 are otherwise met; I hold them until item 3 lands.
All four review items are done and pushed to the same branch. The Tea Party tests, the Tea Party playtest and serve.test.mjs pass here. I did not rerun shell.test.mjs or town.test.mjs, or look at the page on a phone.
- Dead state:
G.heardis gone, from the state object and frombegin(). PINK_RGB(): deleted, and the teapot knob uses an inline[201, 138, 160].laston a round-clearing serve:tea-party/table.jsnow keepslast(the cup just served) when a serve starts the next round.table.test.mjshas a new test for it.serveGuestin the page readsP.lastdirectly, and the code that worked out matched parts from score deltas andM.PART_POINTS/M.PERFECT_BONUSis removed.#scoresblock: I folded it into two lines plus the cup line, with the rows flowing in one flex-wrap block. The first line reads round, guests, points. The second reads wrong parts, perfect and best. The cup line only shows while a guest is selected. This takes about 3 lines instead of 7 over the top-left of the canvas. On a portrait phone the canvas is centred and sits below the old block anyway. On a short landscape screen the two lines still overlay the canvas's top-left corner, but only the cup line grows when a guest is selected.
I did not touch rounds.mjs; the scripted round still reaches the win line.
🤖 Generated with Claude Code
Clean. Both pages answer 200 on the preview. The page drives the game only through table.js. Every output is set via textContent or drawn to the canvas. The repo has no server writes or terminal, so the identity and terminal checks don't apply. Tests cover the behaviours added, including the last fix in table.js. I could not open the screenshots from my sandbox, so I judged the layout from the source, and I did not run the test suite myself.
Tea Party is playable at
/tea-party/and listed in the catalogue. I tested it with the new page tests, the scripted round,serve.test.mjs,shell.test.mjsandtown.test.mjs. Last run after the rebase, those passed apart fromshell.test.mjsandtown.test.mjs, which I did not rerun then. I did not run the wholebun test.What changed
tea-party/index.htmldraws a gingham-clothed garden table with 2–5 guests, a round teapot, a tall copper coffee pot, a milk jug, a sugar bowl and a cake stand. Guests differ by hat (top hat, boater, sun hat, bobble hat, party hat) as well as colour. While orders are shown, each guest's bubble appears in turn, using small icons for drink, milk, sugars and cake.tea-party/table.js. The HUD shows round, guests, score, wrong parts, perfect cups, best score and the cup being poured. Every move, and each order as it is shown, goes to the aria-live status.prefers-reduced-motion, there is a#mutebutton, no.mp3, and the rules popup is four lines. The page repaints only when something changed, so the scripted round costs about 1.3 s.shell.jshas theGAMESentry exactly as specified, theindex.html<li>, the README Games table row and the without-music list. The town draws its building fromGAMES, sotown.jsneeded no edit.bun scripts/og.mjshas been run.rounds.mjshas a scripted round that serves all 14 guests perfectly and reaches the win line.serve.test.mjsasserts/tea-party/and/tea-party/table.jsanswer 200.tea-party/page.test.mjsis new and has 7 tests covering the bubbles in turn, serving by taps and by keys, an unfinished cup, losing and restarting, mute, and page-source checks.Things to know
last: null. The page then works out how that cup went from the score and perfect-count change, usingM.PART_POINTSandM.PERFECT_BONUS. A small change intable.jsto keeplastwould be cleaner; I left the rules alone.scripts/gate.ts,scripts/fast.tsandscripts/design-lint.tsdo not exist in this repository, so none ran.bun x tsc --noEmitonly printed usage because there is no tsconfig.To try it: open
/tea-party/, listen to the bubbles, then serve from memory. Locally,bun test tea-partyandbun test playtest.test.mjs -t tea-partycover it.🤖 Generated with Claude Code
Closes #278