Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
Add Shunting Yard: the playable page and its place in the catalogue, on the rules in `shunting-yard/yard.js` #185
Check · Review · Land · Live done — Landed and live in production.
Shunting Yard now has its playable page at shunting-yard/index.html, rebased on main and pushed. The page draws the yard and calls shunting-yard/yard.js for every move, so it adds no rule of its own. I ran the playtest for shunting-yard and the serve, shell and town tests, and all pass.
shipped production is serving it deploy ab54f53
5 earlier comments · 3 events
Shunting Yard now has its playable page at shunting-yard/index.html, rebased on main and pushed. The page draws the yard and calls shunting-yard/yard.js for every move, so it adds no rule of its own.
I ran the playtest for shunting-yard and the serve, shell and town tests, and all pass. The playtest includes the scripted round that reaches the end line. scripts/gate.ts, scripts/fast.ts and scripts/design-lint.ts don't exist in this clone, so none of them ran. bun x tsc --noEmit found no tsconfig here and only printed its help text. I did not run the full bun test; the forge does that on push.
- Play: tap a track to lift its end wagon, tap another to set it down; tapping the same track puts it back. Keys 1–4 pick the tracks. Arrow keys move a ring and Space or Enter lifts or sets down, which I added beyond the issue so the keyboard works without number keys.
- Look: the engine's steam is the only ambient motion, and it stops under
prefers-reduced-motion. Every wagon carries its number on a white plate, so order never depends on colour. The canvas aria-label explains how to play, the rules popup is four lines, and there is a#mutebutton with no.mp3. - HUD: it shows the level and the moves against the level's target. The status line shows the rules' own
line, and refusals are phrased from the reason the rules return. - Catalogue: the
GAMESentry is exactly as specified. The rootindex.htmlhas the matching<li>. The README has the Games table row, the no-music list and the ambient-motion line. The town gets its building automatically fromGAMES, sotown.jsis unchanged.og/shunting-yard.pngandog/home.pngare regenerated. - Tests:
rounds.mjshas a scripted round that follows the rules' own shortest solution with the number keys and reaches "Won: 5 levels cleared…".serve.test.mjsasserts that/shunting-yard/and/shunting-yard/yard.jsanswer 200. - Test I changed: the kind whitelist in
serve.test.mjsdidn't includePuzzle, so I added it. The test was wrong there; this is the first game of that kind. - Conflict: rebasing hit a conflict in the README's no-music list, with Sandcastle Tide on main. I merged both names into the one line.
- Not done: no new dependencies, and no animation when a level clears beyond a status note. I did not add move hints.
The preview failed on one test, "on a 360px phone every building of the real catalogue is still thumb-sized" in plaza.test.mjs. With Shunting Yard added, the town's buildings shrank to about 33 px wide, under the test's 40 px minimum.
The fix is to raise the town canvas's minimum width from 600 to 760 CSS pixels. I changed it in both plaza.js (MIN_CSS_WIDTH) and the min-width in the root index.html. The test requires the two to match. I also updated the README sentence that states the figure.
On a phone the town now scrolls sideways a bit further. I picked 760 rather than the 720 or so this game alone needs, so the next few games don't trip the test again.
I ran plaza, town, serve and shell tests locally and they pass. I did not run the full suite; the forge does that on the push, which is 5c26755.
I found no failing test, so I changed nothing and pushed nothing; git push reported everything up to date. The deploy log you sent stops partway through playtest.test.mjs (at beekeeper) with no (fail) line, so I can't tell why the deploy failed.
What I ran here, all green:
playtest.test.mjs: all 252 tests pass, including the 5 for Shunting Yard.serve,town,plaza,shell,yard,stats,limitsandramptests: 119 pass, 0 fail.bun x tsc --noEmitprinted only its usage help, because the repository has no tsconfig.- This repository has no
scripts/gate.tsorscripts/fast.ts, so I skipped those.
My best guess is that the deploy ran out of time or was cut off, not that a test failed. The full playtest suite took 324 seconds in this sandbox, and the preview's log ends inside it.
The remote tracking ref for this branch shows as [gone] in git status. Nothing new reached the forge from this turn, so the next push to this branch will have to come from a new commit or from you.
Pull description: Adds Shunting Yard, a playable page at shunting-yard/index.html built on the tested rules in shunting-yard/yard.js. It is wired into the catalogue (plaza.js, rounds.mjs, shell.js, an og/shunting-yard.png card). The town's minimum canvas is widened to 760px so every building stays thumb-sized as the catalogue grows. To try it, open /shunting-yard/ or tap its building in the town.
Shunting Yard is wired in everywhere the catalogue needs: the GAMES entry, the root fallback <li>, the README row, the og card and a scripted round. The page and yard.js both answer 200 on the preview. It is forged by the crew and says so. I could not open the forge screenshots from my sandbox, so this review is from the served HTML and the source, not from the pictures.
The page works with a thumb or a keyboard. The canvas is focusable and labelled, tapping a track lifts and sets down, keys 1-4 pick a track, and arrows with Space move a ring. Refusals are worded for a person, the status line is an aria-live region, and the number plates mean order never rests on colour alone. Steam stops under reduced motion. The widened town canvas (760px) is a justified fix for the 360px thumb-size test.
Two things I would do next:
- The mute button flips its label between "sound on" and "sound off" and also sets aria-pressed. A screen reader hears the state twice and the label can read backwards. Keep one fixed label ("sound") and let aria-pressed carry the state, or drop aria-pressed.
- choose() finds out whether a track can be lifted by calling Yard.move with a made-up target (t===1?2:1). That is brittle if the rules change. Ask yard.js for a plain canLift(state, t) instead. Also, the no-JS page is only the noscript line; a short sentence on how to play would help.
I merged main into the branch and pushed it. The four conflicts (README.md, index.html, og/home.png, plaza.js) are resolved, and the tests I ran pass.
- Canvas width:
mainhad already moved the town's minimum canvas to 800px, so I kept 800 inplaza.jsandindex.htmland dropped this branch's 760. - README: I took
main's text. Then I added Shunting Yard back to the catalogue table, the list of games with their own sound effects, and the ambient-motion line (the engine's steam). - Home page: I put Shunting Yard's fallback list entry back into
index.html, after Tower Duel. - Home card: I regenerated
og/home.pngwithbun scripts/og.mjs. The existing one was stale, andserve.test.mjscaught it.
I ran the serve, town, plaza, shell and ramp tests, which pass, and the Shunting Yard rules test, which passed on the first run after the merge. The Shunting Yard playtest also passes. I did not re-run the full playtest suite after the merge; the forge's check does that on this push.
I merged main into the branch and pushed it. All six conflicts are resolved, and Shunting Yard and Hedge Maze now sit side by side.
- Shunting Yard and Hedge Maze: In
shell.js,rounds.mjs,index.htmland the twoserve.test.mjspage-serving tests, I kept both games' entries. - Input kinds:
serve.test.mjsnow acceptsmain's wider set of input kinds, includingKeys. - README: I took
main's text and re-added Shunting Yard to the list of games that play on their own sound effects and to the ambient-motion line. - Home card:
og/home.pngis regenerated withbun scripts/og.mjsso it shows both games.
The serve, town, plaza, shell, ramp, Shunting Yard and Hedge Maze tests pass. The Shunting Yard and Hedge Maze playtests pass too. I didn't re-run the full playtest suite; the forge's check does that on this push.
Shunting Yard now has its playable page at /shunting-yard/ and its entry in the catalogue. I couldn't see why the preview deploy failed, because the log you gave me stopped partway through the playtests.
Run locally, the full playtest suite passes (262 tests, 484 s) and so do serve, shell, plaza, town and the Shunting Yard tests. The one cause I could find was that main had moved on with Market Barrow (#206) while the branch still lacked it. I can't say that caused the failure, so check the next preview deploy. If the full playtest run (about 8 minutes here) is what failed, it may be a timeout rather than a code problem.
- Merge: I merged
origin/maininto the branch and pushed. - README conflict: It conflicted in two lines: the list of games that use their own sound effects, and the ambient-motion sentence. I kept both Market Barrow and Shunting Yard in each.
- Home card: I regenerated
og/home.pngwithbun scripts/og.mjs, so it shows every game. - Checks:
bun x tsc --noEmitprinted only the compiler's usage text. The post-merge tests forserve,shell, Market Barrow and Shunting Yard pass (109 tests). I did not re-run the full playtest suite after the merge, since it was already green before it.
To try it, run bun serve.mjs and open /shunting-yard/, or use the preview at https://pixel-plays--185--forge-trevato-apps.open-platform.sh.
Approved. The earlier head 5c267550ea9a is not in my clone, so I read the change as it stands. The page and yard.js both answer 200 on the preview. The page is wired into the catalogue: GAMES, the no-JS list, the README row, the rounds.mjs playtest, the serve test and the og card. The keyboard and tap paths both work, each wagon carries its number plate so order never rests on colour, the status line is a polite live region, and the steam stops under reduced motion. Nothing the earlier rounds asked for appears unmet. Non-blocking: 1) the canvas is the only way to play, so a no-JS visitor sees only a notice; a short text description of the rules there would help. 2) The tap targets are whole tracks, which is fine, but a visible Undo or put-back hint would help on a phone.
Shunting Yard now has its playable page at
shunting-yard/index.html, rebased on main and pushed. The page draws the yard and callsshunting-yard/yard.jsfor every move, so it adds no rule of its own.I ran the playtest for
shunting-yardand the serve, shell and town tests, and all pass. The playtest includes the scripted round that reaches the end line.scripts/gate.ts,scripts/fast.tsandscripts/design-lint.tsdon't exist in this clone, so none of them ran.bun x tsc --noEmitfound no tsconfig here and only printed its help text. I did not run the fullbun test; the forge does that on push.prefers-reduced-motion. Every wagon carries its number on a white plate, so order never depends on colour. The canvas aria-label explains how to play, the rules popup is four lines, and there is a#mutebutton with no.mp3.line, and refusals are phrased from the reason the rules return.GAMESentry is exactly as specified. The rootindex.htmlhas the matching<li>. The README has the Games table row, the no-music list and the ambient-motion line. The town gets its building automatically fromGAMES, sotown.jsis unchanged.og/shunting-yard.pngandog/home.pngare regenerated.rounds.mjshas a scripted round that follows the rules' own shortest solution with the number keys and reaches "Won: 5 levels cleared…".serve.test.mjsasserts that/shunting-yard/and/shunting-yard/yard.jsanswer 200.serve.test.mjsdidn't includePuzzle, so I added it. The test was wrong there; this is the first game of that kind.Closes #163