Fixed division end of track labels and other minor bugs. Trains now show their information. Play cards now required to get to 3 or less, no other restrictions. auto hide now more prominent. it and sounds now are in replay.

This commit is contained in:
Jesse
2026-08-04 13:43:28 -04:00
parent c3c5c59a45
commit 4bba991f41
11 changed files with 466 additions and 161 deletions
+53
View File
@@ -10,6 +10,59 @@ The target is 20 Revenue over 5 Days.
## Unreleased
### The replay behaves like the game it is replaying
Sound and the district auto-hide were built for the playable page and the replay had neither, which
made watching a game back a poorer experience than playing it. Both are there now, and both are the
SAME implementation rather than a second copy:
- `cuesFor` decides what happened — a Stage ended, a Day turned, a train was built — and is imported
by the live game and called by the replay recorder, so the two cannot disagree about when a Stage
ended. Frames carry their cues.
- `playCue` decides what that sounds like. It was three module-level functions with a shared
`AudioContext`; it is now one self-contained function, embedded into the replay by `toString()`
exactly as the board renderers are. The context is parked on `window` because the embedded copy
has no module scope to keep it in.
**Sounds fire only when stepping FORWARD one frame.** Scrubbing across a hundred frames would
otherwise fire a hundred whistles at once, and stepping backwards would sound a Stage ending that is
being un-done.
Both default to the quiet, tidy setting: muted, and auto-hide on.
The replay's DOM stub had no `classList`, so the page threw while rendering rather than folding a
panel. It has one now — the same gap the playable page's stub had, and the same fix.
### Playtest fixes
**The end-of-line labels were cut to three letters.** "trains enter" and "trains leave" hang off the
ends of the route, and the canvas padding was sized for the buffer stops alone — so the west end read
"TER" and the east "tra". Padding now allows for the words.
**"End my turn" became "End Local Operations".** It ends the phase, and the old wording invited the
reading that it ended something smaller.
**The hand limit is a limit, not a toll on drawing.** Drawing a card set "you must now play one",
so a player who had already played two cards and drew back to three was still forced to spend one.
§6.2 is a hand LIMIT — "reduce his hand to no more than three cards", four with a Red Flag — and
that is now the only thing that blocks the end of a turn. It is derived from the hand at each
render, and a test asserts the page and the engine never disagree about whether the turn may end.
The engine removes `draw.end` outright when the hand is over the limit, so the page draws a disabled
button naming the reason rather than silently offering no way out.
**A train now says what its card calls for.** Reported on seed 22222: Extra X22 offered a caboose
and nothing else with no reason given. The rules were right — "Pee-Dee" is a per-diem train whose
consist is one caboose and no cars, and §8.2 forbids the wrong cars however few are carried — but
the screen never said so, which reads as a broken game. The New Train header now names the train and
its consist: *Making up Extra X22 "Pee-Dee": its card calls for 1 caboose — Per-diem train. May only
pick up MTs.*
**The auto-hide control said what the panel was doing, not what pressing it would do.** "auto ·
folded" reads as a status line and was missed; it now reads "auto-hide: on — click to keep open",
and looks like a control rather than a caption.
**The whistle is twice as long,** and sound now defaults to OFF.
### A legal move you could not click
Reported from playtesting: laying a straight offered three places in the list and highlighted one on