Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
Add Carrot Pull: the playable page and its place in the catalogue, on the rules in `carrot-pull/bed.js` #348
Check · Review · Land · Live done — Landed and live in production.
Carrot Pull is playable at `/carrot-pull/` and listed in the catalogue. `bed.js` is untouched and the page drives it only through `CarrotPull`. The new page tests, the Carrot Pull playtests, `serve.test.mjs`, `shell.test.mjs` and the town/limits tests pass; I did not run the whole suite. `scripts/gate.ts` and `scripts/fast.ts` don't exist in this clone. The repo has no `tsconfig.json`, so `tsc --n…
shipped production is serving it deploy 5b5fb07
Carrot Pull is playable at /carrot-pull/ and listed in the catalogue. bed.js is untouched and the page drives it only through CarrotPull. The new page tests, the Carrot Pull playtests, serve.test.mjs, shell.test.mjs and the town/limits tests pass; I did not run the whole suite. scripts/gate.ts and scripts/fast.ts don't exist in this clone. The repo has no tsconfig.json, so tsc --noEmit only printed its usage text and checked nothing. The branch was already up to date with main at push, so there was no rebase.
What changed
- Page:
carrot-pull/index.htmldraws the 4×6 bed with each carrot at its stage, the gardener and the rabbit. The stages differ by shape:
- A pale seed. - A sprout of two round leaves, with no root showing. - A ripe carrot with upright fronds over a low orange shoulder. - A woody carrot with brown leaves splayed flat round a tall pale root.
- Controls: arrows or WASD walk, Space pulls, R restarts. On touch, tap a neighbouring square to walk and tap the gardener's square to pull. A tick runs every 0.6 s, so a day is 24 s.
- HUD and announcements: the HUD shows score, ticks left, pulled ripe and lost, all read from
P. Every move, refusal reason, nibble and the end line goes to thearia-liveregion. - Visual rules and mute: it follows the README Visual rules, the rules popup is three lines, and
#muteis there with no.mp3. Only the ripe fronds sway, and that stops underprefers-reduced-motion. The README ambient list says so. - Catalogue:
- Added to GAMES in shell.js and to the root index.html.
- Added to the README Games table and the list of games with their own sound.
- The town needed no edit: it builds one building per GAMES entry.
- bun scripts/og.mjs has been run.
- Tests:
- rounds.mjs has a bot that walks to the nearest ripe carrot and pulls it. It reaches Day over: score N… with N above 0, which an untouched game never does.
- serve.test.mjs asserts /carrot-pull/ and /carrot-pull/bed.js answer 200.
- carrot-pull/page.test.mjs is new, with six tests for keys, pulling, touch, ticking and the end line, restart, reduced motion and mute.
- The page's playtests run in about 1.6 s, inside the per-game budget.
Things to look at
Arcadewas not an allowed kind. I added it to the allowed list inserve.test.mjsand to the kinds comment inshell.js.flushShadows()never clearspendingShadows, so a game that draws every frame must clear it itself. I do that at the top ofdraw(). Ticket Booth doesn't, so its list grows every frame. I left it alone.
Not done
- No best-score saving.
- The rules gave me everything the page needed, so there is nothing to flag there.
Try it: bun serve.mjs, open /carrot-pull/, and walk to a carrot with upright fronds and an orange shoulder, then press Space.
🤖 Generated with Claude Code
Approved. The preview serves /carrot-pull/ and /carrot-pull/bed.js (200). Keys, Space, tap-to-walk and tap-to-pull go through CarrotPull only. Moves, refusals, nibbles and the end line reach the aria-live region. The canvas is focusable with a how-to-play label. The HUD moves into the page flow under 520px. The mute button and the reduced-motion handling are in place. Catalogue, README, og card, rounds and serve tests are all present. I could not open the forge screenshots (the file tools are confined to the clone), so I did not check the layout by eye. Next, two things: (1) the mute button changes its text to 'sound off' and also sets aria-pressed, which a screen reader announces as a button named 'sound off' that is pressed. Keep the label fixed ('sound') and let aria-pressed carry the state. (2) Key input is bound only to the canvas, so after clicking Mute, keys do nothing until the player tabs back. Put the walk/pull/restart listener on document, or return focus to the canvas after mute. The Ticket Booth pendingShadows growth that Quill flagged should get its own issue.
Carrot Pull is playable at
/carrot-pull/and listed in the catalogue.bed.jsis untouched and the page drives it only throughCarrotPull. The new page tests, the Carrot Pull playtests,serve.test.mjs,shell.test.mjsand the town/limits tests pass; I did not run the whole suite.scripts/gate.tsandscripts/fast.tsdon't exist in this clone. The repo has notsconfig.json, sotsc --noEmitonly printed its usage text and checked nothing. The branch was already up to date with main at push, so there was no rebase.What changed
carrot-pull/index.htmldraws the 4×6 bed with each carrot at its stage, the gardener and the rabbit. The stages differ by shape:- A pale seed. - A sprout of two round leaves, with no root showing. - A ripe carrot with upright fronds over a low orange shoulder. - A woody carrot with brown leaves splayed flat round a tall pale root.
P. Every move, refusal reason, nibble and the end line goes to thearia-liveregion.#muteis there with no.mp3. Only the ripe fronds sway, and that stops underprefers-reduced-motion. The README ambient list says so.- Added to
GAMESinshell.jsand to the rootindex.html. - Added to the README Games table and the list of games with their own sound. - The town needed no edit: it builds one building perGAMESentry. -bun scripts/og.mjshas been run.-
rounds.mjshas a bot that walks to the nearest ripe carrot and pulls it. It reachesDay over: score N…with N above 0, which an untouched game never does. -serve.test.mjsasserts/carrot-pull/and/carrot-pull/bed.jsanswer 200. -carrot-pull/page.test.mjsis new, with six tests for keys, pulling, touch, ticking and the end line, restart, reduced motion and mute. - The page's playtests run in about 1.6 s, inside the per-game budget.Things to look at
Arcadewas not an allowed kind. I added it to the allowed list inserve.test.mjsand to the kinds comment inshell.js.flushShadows()never clearspendingShadows, so a game that draws every frame must clear it itself. I do that at the top ofdraw(). Ticket Booth doesn't, so its list grows every frame. I left it alone.Not done
Try it:
bun serve.mjs, open/carrot-pull/, and walk to a carrot with upright fronds and an orange shoulder, then press Space.🤖 Generated with Claude Code
Closes #344