Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
Add Hedge Maze: the playable page and its place in the catalogue, on the rules in `hedge-maze/maze.js` #184
Check · Review · Land · Live done — Landed and live in production.
Hedge Maze is now a playable page at hedge-maze/index.html, listed in the catalogue and driven only by hedge-maze/maze.js. I ran serve.test.mjs, shell.test.mjs, town.test.mjs, hedge-maze/ and the hedge-maze cases of playtest.test.mjs, all green, on the rebased branch. I did not run the whole suite.
shipped production is serving it deploy ab54f53
3 earlier comments · 1 event
Hedge Maze is now a playable page at hedge-maze/index.html, listed in the catalogue and driven only by hedge-maze/maze.js. I ran serve.test.mjs, shell.test.mjs, town.test.mjs, hedge-maze/ and the hedge-maze cases of playtest.test.mjs, all green, on the rebased branch. I did not run the whole suite. bun x tsc --noEmit only printed its help text here because the repo has no tsconfig, so it checked nothing. scripts/design-lint.ts and scripts/gate.ts don't exist in this clone, so I ran neither. I did not look at the page in a browser, only at the share-card render, so the walker and fountain sizes are untested by eye on a phone.
- Page:
- It draws the hedges, the gravel path, the walker and the fountain, plus the HUD for maze number, seconds on the bell, solved count, best, and the rules' own status line.
- Swiping, or tapping beside the walker, steps one cell that way. The arrow keys turn with the picture: up goes up-right, right goes down-right, and so on. Space or Enter also steps, because the playtest harness presses them.
- Tapping or pressing a key after the game ends starts a new one, keeping the best score in localStorage.
- The canvas, camera, shadows and rules popup follow the README Visual rules. The only ambient motion is the fountain's droplets, which stop under prefers-reduced-motion.
- It has a #mute button, makes its own sounds, and has no .mp3.
- Catalogue:
- Added to GAMES with the exact entry from the issue, and as the matching <li> in index.html.
- The README has a Games table row, the entry in the list of games without music, and the fountain in the ambient-motion line.
- bun scripts/og.mjs has been run, which gives og/hedge-maze.png and an updated og/home.png.
- The town building comes from GAMES automatically, so town.js is unchanged.
- Tests:
- rounds.mjs has a scripted round that walks the one path to the fountain with the arrow keys, maze after maze. After the fifth maze it waits out the bell and ends on the "You win!" line.
- serve.test.mjs asserts /hedge-maze/ and /hedge-maze/maze.js answer 200.
- I widened one existing assertion in serve.test.mjs so it accepts kind Puzzle and input Keys. Those are new values the issue dictates, so the old allow-list was what was wrong.
I did not touch maze.js or add any rule to the page. After five mazes the game keeps going until the bell rings, as the rules define, so a win is only announced at the last bell.
I rebased on main before pushing, and the append points had not conflicted.
🤖 Generated with Claude Code
I merged main into the branch and pushed it, and the branch now merges cleanly.
README.md: The conflict was in the list of games that have no music:mainadded Sandcastle Tide there and my branch added Hedge Maze. I kept both, so the list ends "Tower Duel, Sandcastle Tide and Hedge Maze play on their own sound effects". The Hedge Maze rows in the Games table and the ambient-motion line were not in the conflict and are intact.og/home.png: I tookmain's version and reranbun scripts/og.mjs, so the image shows both Sandcastle Tide and Hedge Maze.- Tests:
serve.test.mjs,shell.test.mjsandtown.test.mjspass in full. Theplaytest.test.mjscases forhedge-mazeandsandcastlealso pass. I did not run the whole suite; the forge runs it on the push.
🤖 Generated with Claude Code
The preview deploy failed because adding Hedge Maze took the catalogue past what the town's 600px minimum could hold. I widened the minimum to 760px and pushed.
The failing test was plaza.test.mjs, "on a 360px phone every building of the real catalogue is still thumb-sized". With one more building, each one came out 33.3px wide at the 600px minimum, and the test requires 40px. Nothing in the maze page itself was at fault.
Change: I raised MIN_CSS_WIDTH in plaza.js and the matching min-width in index.html from 600px to 760px. I also updated the README line that quotes the width, because the test checks that index.html and plaza.js agree. 760 gives some headroom for the games other pulls will add, but it is a guess. On a phone the town now scrolls sideways a little further.
Tests: plaza.test.mjs, town.test.mjs and serve.test.mjs all pass locally. I did not run the full suite here, so the forge's check on this push is the full run.
🤖 Generated with Claude Code
Hedge Maze is now playable from the home page: a card in the catalogue and a building in the town, both linking to its page. I merged main into the branch and pushed. The forge check on that push is the verdict; it hasn't come back yet.
The preview deploy's log was cut off in the middle of the playtest suite, so I never saw the actual failure. When I ran that suite here it passed, all 252 tests, but it took about 326 seconds. I think the deploy ran out of time or lost the race with main's changes; that is a guess, not something I confirmed.
The branch was behind main, which had added Allotment, Carousel and several other games, and the merge conflicted in four places:
plaza.js,index.html: I tookmain's 800px minimum canvas width in both. It replaces the 760px this branch had set.README.md: I kept both lists of games with no music and of ambient motion, so Hedge Maze and Allotment are both named.og/home.png: I regenerated the share cards withbun scripts/og.mjs.
Before pushing I re-ran the home page, town, shell, server and ramp tests (100 pass) and the Hedge Maze, Allotment and Carousel playtests, which pass. I did not re-run the full playtest suite after the merge. bun x tsc --noEmit printed only its help text, so I can't call the type check clean.
Nothing was added beyond the merge fix.
🤖 Generated with Claude Code
Hedge Maze is reachable from the home card, the town and the menu. The page answers 200 on the preview. It follows the repo pattern: rules only in maze.js, swipe or tap-beside-the-walker plus arrow keys, a #mute button, a polite status line, reduced motion respected, best score in localStorage. Rules tests exist, rounds.mjs plays it through, and serve.test.mjs covers the page. I could not open the forge screenshots from my sandbox, so I did not judge the picture by eye. Two things I would do next: (1) hedge-maze/index.html:~38 sets outline:none on the canvas, so a keyboard user gets no focus ring. Add a :focus-visible outline. Space and Enter also step north, which surprises a keyboard user. Better for them to do nothing until the game is over, when they start a new one. (2) The card says Keys as its input, but a phone player swipes. Consider Tap or Drag so the tag matches how it is played on a phone, and add a noscript line saying the game needs JavaScript, as tower-duel does.
Hedge Maze is now a playable page at
hedge-maze/index.html, listed in the catalogue and driven only byhedge-maze/maze.js. I ranserve.test.mjs,shell.test.mjs,town.test.mjs,hedge-maze/and the hedge-maze cases ofplaytest.test.mjs, all green, on the rebased branch. I did not run the whole suite.bun x tsc --noEmitonly printed its help text here because the repo has no tsconfig, so it checked nothing.scripts/design-lint.tsandscripts/gate.tsdon't exist in this clone, so I ran neither. I did not look at the page in a browser, only at the share-card render, so the walker and fountain sizes are untested by eye on a phone.- It draws the hedges, the gravel path, the walker and the fountain, plus the HUD for maze number, seconds on the bell, solved count, best, and the rules' own status line. - Swiping, or tapping beside the walker, steps one cell that way. The arrow keys turn with the picture: up goes up-right, right goes down-right, and so on. Space or Enter also steps, because the playtest harness presses them. - Tapping or pressing a key after the game ends starts a new one, keeping the best score in
localStorage. - The canvas, camera, shadows and rules popup follow the README Visual rules. The only ambient motion is the fountain's droplets, which stop underprefers-reduced-motion. - It has a#mutebutton, makes its own sounds, and has no.mp3.- Added to
GAMESwith the exact entry from the issue, and as the matching<li>inindex.html. - The README has a Games table row, the entry in the list of games without music, and the fountain in the ambient-motion line. -bun scripts/og.mjshas been run, which givesog/hedge-maze.pngand an updatedog/home.png. - The town building comes fromGAMESautomatically, sotown.jsis unchanged.-
rounds.mjshas a scripted round that walks the one path to the fountain with the arrow keys, maze after maze. After the fifth maze it waits out the bell and ends on the "You win!" line. -serve.test.mjsasserts/hedge-maze/and/hedge-maze/maze.jsanswer 200. - I widened one existing assertion inserve.test.mjsso it accepts kindPuzzleand inputKeys. Those are new values the issue dictates, so the old allow-list was what was wrong.I did not touch
maze.jsor add any rule to the page. After five mazes the game keeps going until the bell rings, as the rules define, so a win is only announced at the last bell.I rebased on main before pushing, and the append points had not conflicted.
🤖 Generated with Claude Code
Closes #151