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
Merged 32d 7h ago, 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.
-
Reviews
Changes requested — before the latest pushPlayable 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.
ApprovedClean. 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
lastfix 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. - Dead state:
-
Checks
shipped production is serving it deploy 7b8dc66
-
History
- Tea Party review: keep last on a round-clearing serve and read it, drop dead state, fold the HUD into two lines 3d949aa
- Add Tea Party: the playable page and its place in the catalogue, on the rules in tea-party/table.js 38b0984
- Village Draughts moves: `moves(state)` checked against an independent rule check across 200 seeded games in `village-draughts/board.test.mjs` (#296) c447f73
- Tea Party rules: a tested `tea-party/table.js` where guests call out their orders and you serve each one from memory as the table grows, from plain data, in a two-file pull with a test file that runs in under a second (#297) 10735e5
- Add Skipping Rope: the playable page and its place in the catalogue, on the rules in `skipping-rope/rope.js` (#295) d9f4afc
- Skipping Rope rules: a tested `skipping-rope/rope.js` where you jump the turning rope as it quickens and more skippers join, from plain data, in a two-file pull with a test file that runs in under a second (#291) 3349b83
- Village Draughts rules: a tested `village-draughts/board.js` with forced captures, multi-jumps, crowning and a seeded computer opponent, from plain data, in a two-file pull with a test file that runs in under a second (#289) 3669652
- Duck Race stream: every seed lays rocks, eddies and fast water inside the stream, checked across seeds in `duck-race/stream.test.mjs` (#290) 5b72aef
- Add Library Shelf: the playable page and its place in the catalogue, on the rules in `library-shelf/shelf.js` (#285) 9c36ff9
- Add Jam Jars: the playable page and its place in the catalogue, on the rules in `jam-jars/shelf.js` (#284) 5a6842f
- Add Conkers: the playable page and its place in the catalogue, on the rules in `conkers/match.js` (#283) fe42c30
- Add Stained Glass: the playable page and its place in the catalogue, on the rules in `stained-glass/window.js` (#282) edb3750
- Library Shelf rules: a tested `library-shelf/shelf.js` where you slide books along their runners to clear a gap for the returned book, within par slides, from plain data, in a two-file pull with a test file that runs in under a second (#281) b5354e4
- Add Rock Pool: the playable page and its place in the catalogue, on the rules in `rock-pool/pool.js` (#253) dca7485
- Stained Glass rules: a tested `stained-glass/window.js` where you colour leaded panes so no two neighbours match, within par strokes, from plain data, in a two-file pull with a test file that runs in under a second (#273) d0e141d
- Conkers rules: a tested `conkers/match.js` where you time a swing on a power meter to crack a run of rivals' conkers before yours cracks, from plain data, in a two-file pull with a test file that runs in under a second (#262) 95370c3
- Duck Race rules: a tested `duck-race/stream.js` where you steer a rubber duck across stream lanes past rocks and eddies against three rivals, from plain data, in a two-file pull with a test file that runs in under a second (#260) 366d3b1
- Jam Jars rules: a tested `jam-jars/shelf.js` where you pour layers of fruit between jars until each holds one fruit, within par pours, from plain data, in a two-file pull with a test file that runs in under a second (#274) 9b786b7
- Add Mill Race: the playable page and its place in the catalogue, on the rules in `mill-race/race.js`, inside the per-game test budget (#252) f0b763b
- Dry Stone Wall rules: a tested `stone-wall/wall.js` that lays stones in courses so no joint sits over another, from plain data, with a test file that runs in under a second (#261) a61ffe4
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
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
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