Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
Add Jam Jars: the playable page and its place in the catalogue, on the rules in `jam-jars/shelf.js` #284
Check · Review · Land · Live done — Landed and live in production.
Jam Jars is now a playable game on jam-jars/index.html, built on jam-jars/shelf.js, and I've pushed it. The full playtest suite passes, including a scripted round that clears all four shelves to the win line. I also ran shell.test.mjs, town.test.mjs and serve.test.mjs, and they pass.
shipped production is serving it deploy ab54f53
1 earlier comment · 1 event
Jam Jars is now a playable game on jam-jars/index.html, built on jam-jars/shelf.js, and I've pushed it. The full playtest suite passes, including a scripted round that clears all four shelves to the win line. I also ran shell.test.mjs, town.test.mjs and serve.test.mjs, and they pass. I did not run the design lint, tsc or the gate: scripts/design-lint.ts, scripts/gate.ts and scripts/fast.ts don't exist in this repository, and bun x tsc --noEmit doesn't run here either (no TypeScript config).
What changed
- The game: a pantry shelf of 3–5 glass jars with their fruit layers showing through the glass. Tap a jar or press its number key to lift it, then tap another to pour. An undo button and the pours-against-par count sit in the HUD.
- Rules and HUD: the page only calls
start,pour,undo,restartandtopfrom the rules, and the status line shows the rules' ownline. When a pour is refused, the HUD says why and nothing changes. - Colour-blind play: each fruit has its own pip pattern as well as its colour (plum dots, fig stripes, quince checks).
- House style: 360x280 canvas, fixed camera, hard shadows to the screen-right. The sunlight band on the empty glass stops under
prefers-reduced-motion. The canvas aria-label says how to play, the rules popup is four lines,#muteis there, and no.mp3is committed. - Extra keys: besides the digit keys, arrows move along the shelf, Space or Enter picks up or pours, U undoes, R restarts the shelf, and Escape puts a held jar down.
- Catalogue: the
GAMESentry inshell.js, the<li>in the rootindex.html, the README Games row, the no-music list and the reduced-motion note. The town building comes fromGAMES, sotown.jsdidn't change.bun scripts/og.mjswas run, givingog/jam-jars.pngand a regeneratedog/home.png. - Tests:
- jam-jars/page.test.mjs is new: pick up and pour, refused pours, keys, undo, patterns, one repaint per change, mute and the page source checks.
- The rounds.mjs scripted round finds each shelf's shortest solution with a search over the rules' own pour.
- serve.test.mjs asserts that /jam-jars/ and /jam-jars/shelf.js answer 200.
What I chose not to do
- No framework or dependency.
- No drag-to-pour; the issue asks for tap.
- The shelf plank and wall are drawn directly in screen space rather than as engine boxes, because a diagonal engine box can't make a horizontal shelf. The camera angle still holds.
To try it
- Run
bun serve.mjsand open/jam-jars/. - Run
bun test jam-jars/.
The branch was already level with origin/main when I pushed, so the rebase had nothing to do.
I merged main into this branch, resolved the conflicts, and pushed (c803163). The 517 tests in the files I ran pass. I did not run the full suite; the forge's check does that on the push.
main had added Conkers in the same places this pull adds Jam Jars, so both games now sit side by side:
- Catalogue and registration:
README.md(table row),index.html(fallback list) andshell.js(GAMES) list both games. - Round scripts:
rounds.mjshas thejam-jarsentry next to theconkersone. - Server test:
serve.test.mjshas a "served" test for each game. - README prose: the "sound effects" list now ends "Stained Glass, Conkers and Jam Jars". The ambient-motion sentence keeps both games' clauses.
- Share cards: I regenerated
og/home.pngwithbun scripts/og.mjsso the grid includes both games. Nothing else inog/changed.
I ran serve.test.mjs, the jam-jars and conkers tests, and playtest.test.mjs. bun x tsc --noEmit printed only the compiler's usage text, with no type errors listed.
Jam Jars works in the preview: /jam-jars/ and /jam-jars/shelf.js answer 200. The page drives only shelf.js, shows fruit by pip pattern as well as colour, has keyboard, undo and mute, and the HUD is aria-live. I read the source and the diff; I did not finish a local test run, so the green check is what I rely on for bun test. Next: (1) make jars reachable by screen readers as real buttons or a listbox, not only via canvas status text; (2) add a playtest that a 360px layout keeps the HUD clear of the canvas.
Jam Jars is now a playable game on
jam-jars/index.html, built onjam-jars/shelf.js, and I've pushed it. The full playtest suite passes, including a scripted round that clears all four shelves to the win line. I also ranshell.test.mjs,town.test.mjsandserve.test.mjs, and they pass. I did not run the design lint,tscor the gate:scripts/design-lint.ts,scripts/gate.tsandscripts/fast.tsdon't exist in this repository, andbun x tsc --noEmitdoesn't run here either (no TypeScript config).What changed
start,pour,undo,restartandtopfrom the rules, and the status line shows the rules' ownline. When a pour is refused, the HUD says why and nothing changes.prefers-reduced-motion. The canvas aria-label says how to play, the rules popup is four lines,#muteis there, and no.mp3is committed.GAMESentry inshell.js, the<li>in the rootindex.html, the README Games row, the no-music list and the reduced-motion note. The town building comes fromGAMES, sotown.jsdidn't change.bun scripts/og.mjswas run, givingog/jam-jars.pngand a regeneratedog/home.png.-
jam-jars/page.test.mjsis new: pick up and pour, refused pours, keys, undo, patterns, one repaint per change, mute and the page source checks. - Therounds.mjsscripted round finds each shelf's shortest solution with a search over the rules' ownpour. -serve.test.mjsasserts that/jam-jars/and/jam-jars/shelf.jsanswer 200.What I chose not to do
To try it
bun serve.mjsand open/jam-jars/.bun test jam-jars/.The branch was already level with
origin/mainwhen I pushed, so the rebase had nothing to do.Closes #259