v0.7.9.1 — the engine was right twice; the screen was not
Gitea#22: the Division map drew every westbound train in the wrong half of its Mainline card. `regionOfTransit` counts from the end a train entered, which is what the collision rules ask; the map wanted "which printed box, left to right" and used the same number, so an eastbound train came out right by luck and a westbound one came out mirrored. It cost a collision — Train 3 was cleared to follow T5 and ran into TX17, which the picture had drawn ahead of T5 rather than behind it. One mirror in `view.ts`, at the boundary the map is drawn from; the collision rules are untouched. Gitea#21: a second tank car would not come off at a refinery, and "Blocked — why nothing is moving" answered by describing the refinery's green box. The real answer was Train 3's printed rule — the Express works one freight car per location — so the refusal was correct and the panel sent the player to spend a Freight Agent action that could not have helped. No rule changed. The panel now names the budget, asking the reducer's own predicate so its words cannot drift from the rule. Both were replayed from the saves attached to the issues and verified in the exact position each report names. The map fix is proved by mutation: reverting the mirror fails two tests, and making the renderer ignore the region fails a third. Every existing region test ran eastbound, where the mirror is the identity, which is why the bug survived them. 891 tests pass, up from 884. Closes #21 Closes #22 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E3Qk7uresKCHksdZajXCLg
This commit is contained in:
co-authored by
Claude Opus 5
parent
6058f6c17e
commit
7ade60e21f
@@ -19,6 +19,87 @@ page as `v0.1.0 · <sha> · <date>`, so what is deployed can always be identifie
|
||||
|
||||
---
|
||||
|
||||
## 0.7.9.1 — 2026-09-07
|
||||
|
||||
Two playtest bugs from one session (seed 550943578). Both were reported as the game getting a rule
|
||||
wrong; in both the engine was right and what failed was what the screen said about it.
|
||||
|
||||
### The map drew westbound trains in the wrong half of the card (Gitea#22)
|
||||
|
||||
Reported as a collision that hit the wrong train: "the display graphically showed train 17 further
|
||||
west than train 5… I allowed train 3 and it collided w/train 17, not train 5 as expected."
|
||||
|
||||
`regionOfTransit` answers **how far along its crossing a train is**, counted from the end it
|
||||
entered — everything still to run is region 0. That is the question the collision rules ask, both
|
||||
directions share the one index space, and it was correct throughout. The Division map was asking a
|
||||
different question with the same number: **which printed box, left to right.** East is right on
|
||||
this map (Gitea#18), so for an eastbound train the two coincide by luck — it enters at the west end,
|
||||
so "just entered" and "leftmost box" are the same box. A westbound train enters at the **east** end,
|
||||
so its region 0 is the right-hand box, and using the travel index directly drew the whole card
|
||||
mirrored.
|
||||
|
||||
Replayed from the attached save at intent 186, which is the position the ruling was made in: T5 was
|
||||
a Stage from the far end (travel index 1) and TX17 had just entered behind it (index 0). Both
|
||||
westbound, so TX17 was physically **east** of T5 — behind it, in the direction they had both come
|
||||
from. The map drew TX17 at the left, which reads as further west, which reads as further ahead. Asked
|
||||
whether Train 3 could follow Train 5 onto the card, the Superintendent said yes, and Train 3 entered
|
||||
behind — into TX17, exactly where the rules had always had it.
|
||||
|
||||
**So the fix is one mirror in `view.ts`, at the boundary the map is drawn from, and the collision
|
||||
rules are untouched.** `regionOfTransit` keeps its meaning. This is the same class of bug as the
|
||||
consist row at the Whistle Post (seed 270861860), which came out mirrored for the same reason: a
|
||||
number that means "distance run" used where the screen means "place".
|
||||
|
||||
The tooltip carried the same number and now says which way it is counted — "region 2 of 2, counted
|
||||
west to east". Beside "2 Stages still to run" the bare number reads as a contradiction, and the
|
||||
reporter quoted the tooltip as part of what misled them.
|
||||
|
||||
Proved by mutation rather than by assertion: reverting the mirror fails two tests in
|
||||
`mainline-cards.test.ts`, and making the renderer ignore the region fails the SVG placement test in
|
||||
`web.test.ts`. The existing region tests all ran eastbound, where the mirror is the identity, which
|
||||
is why the bug survived them.
|
||||
|
||||
### A refusal the Blocked panel explained wrongly (Gitea#21)
|
||||
|
||||
Reported as "could not drop second tank car at refinery… I dropped the first tank car, but that was
|
||||
all I was allowed to do."
|
||||
|
||||
Replayed from the attached save: the crew was **Train 3**, and the engine's answer was
|
||||
`FREIGHT_WORKED_HERE`. Train 3 is the Express, which prints *"May drop or pick up one freight car at
|
||||
every location"* — **the refusal was correct**, and the budget is per location rather than per turn,
|
||||
so the same train may work another car at the next square it reaches. No rule changed.
|
||||
|
||||
What failed is that nothing said so. The player checked "Blocked — why nothing is moving" and got
|
||||
`refinery 1,0 — green box empty — nothing to load (needs a Freight Agent action)`. That is a true
|
||||
statement about the facility and has nothing to do with why the drop was refused — so it sent them
|
||||
to spend a Freight Agent action that could not have helped. **A panel that answers the wrong
|
||||
question is worse than one that stays silent**, because it looks like an answer. The rule was on the
|
||||
train card's own tooltip, which is not where anyone looks when a button they expected is absent.
|
||||
|
||||
The panel now names it, and only when the crew still has a freight car it could otherwise set out —
|
||||
a spent budget on a train with nothing to drop is blocking nothing, and this panel earns its keep by
|
||||
staying short enough to read. It asks `freightBudgetLeft`, the same predicate the reducer refuses
|
||||
on, through a new exported `freightRuleSpentHere`, so the words cannot drift from the rule.
|
||||
|
||||
Against the reporter's own save the panel now reads:
|
||||
|
||||
```
|
||||
[waiting] refinery 1,0 — green box empty — nothing to load (needs a Freight Agent action)
|
||||
[waiting] Train 3 at (0,1) — ONE FREIGHT CAR PER LOCATION — this train has already worked a
|
||||
freight car on this square, so no more come off or on here until next turn.
|
||||
```
|
||||
|
||||
### Both were verified against the saves attached to the issues
|
||||
|
||||
Not against a reconstruction. Each save was replayed through `fromSave` to the exact intent the
|
||||
report names, and the fix checked in that state — which is what the process item added after v0.7.5
|
||||
through v0.7.8 asks for, three releases that each reported the same bug fixed and each fixed
|
||||
something that was not the reported fault.
|
||||
|
||||
891 tests pass, up from 884.
|
||||
|
||||
---
|
||||
|
||||
## 0.7.9 — 2026-08-30
|
||||
|
||||
Four pieces of feedback on the solitaire setup screen, plus the rules bug the second one exposed.
|
||||
|
||||
Reference in New Issue
Block a user