v0.4.9g — a caboose is not a load, a Day that says it ended, and a train you may throw away

The v0.7.1 bugfix set ported to the playtest line: Gitea#8, #10, #9 and #2. Reasoning, and what
differs from main, in CHANGELOG.md.

- Gitea#8: X22 Pee-Dee refused every caboose, including the one it was made up with. A caboose
  carries the crew, not freight, so it is never a load.
- Gitea#10: a dialog when the Day rolls over, carrying the standings, the Days left and your Revenue
  against the target with the pace. Suppressed on the first frame, on Undo stepping back across a
  rollover, and on the Day the game ends.
- Gitea#9, superseding Gitea#6 from v0.4.9f: a Timetabled train may be discarded, an Extra may not.
  This line takes the plain rule — main has it as a New Game setting.
- Gitea#2: the shortage stays, by Jesse's ruling. A blocked platform now gives its reason instead of
  simply having no button.

Three things are written for this line rather than ported: the Timetabled discard has no setting and
no URL parameter, the Day-end dialog reads f.objective (this line's per-player target) where main
reads its combined victory dials, and Frame gained the viewer index the dialog needs to mark your
row. 636 tests pass; no published replay was retired.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FLnYR4XtXQNamYJXGYT8oC
This commit is contained in:
Jesse.Markowitz
2026-08-25 10:47:10 -04:00
co-authored by Claude Opus 5
parent e255076b5c
commit 9735468d25
15 changed files with 867 additions and 107 deletions
+47 -16
View File
@@ -860,34 +860,65 @@ any setting** — being a place an Extra can start is part of what upgrading buy
---
## §6.2 — a train card is never discarded
## §6.2 — which train cards may be discarded
**Jesse's ruling, v0.4.9e playtest** (Gitea#6): "Players are not allowed to discard Train cards. They
may keep the card in their hand for multiple stages and even multiple days, but they may not discard
it. If a player has three train cards in their hand, and they draw a fourth, then they must play one
of those cards."
**SUPERSEDED ONCE. Read both rulings; the second narrows the first.**
**Extras count.** An Extra is a train, even though it runs once and ends in the Salvage Yard where a
Timetabled card joins the timetable for the rest of the game.
**Gitea#6, v0.4.9e playtest:** "Players are not allowed to discard Train cards. They may keep the
card in their hand for multiple stages and even multiple days, but they may not discard it. If a
player has three train cards in their hand, and they draw a fourth, then they must play one of those
cards." Extras counted: an Extra is a train.
**Gitea#9, 2026-08-24 — the ruling in force:** "Timetabled trains are at the choice of the player:
they can either play or discard. If someone else wants to pick it up, they are more than able to.
The reason: I don't want, if you decide to play a game longer than five days, to decide that maybe
there are too many trains, the stations are jammed, and the railroad doesn't need any more. You can
toss it. Someone else might disagree and pick it up."
So the rule is now:
- a **Timetabled** train may be discarded;
- an **Extra** may not. It never joins the timetable, so it can never be what jams it, and the only
rule it would dodge by being thrown away is the hand limit;
- **on `main` the Timetabled half is a New Game setting** (`discardTimetabled`, on by default),
because Jesse's reasoning is explicitly about LONG games and a five-Day game may well want
Gitea#6's pressure. The 0.4.9 playtest line has no scaffolding for a setting and takes the plain
rule. Both lines behave identically at their defaults.
**"Someone else might disagree and pick it up" needed no machinery.** A discard already goes face-up
onto a Department pile, and a Department pile is exactly what a rival draws from. The second half of
the ruling was already built; only the first half was a change.
§6.2 as transcribed says only "the player must reduce his hand to no more than three cards" with no
exception for any card type, so this is a ruling rather than a gap — the prototype rules do not
address it either way.
exception for any card type, so both of these are rulings rather than gaps — the prototype rules do
not address it either way.
### It needs no forcing mechanism, and that is the point
The interesting property of this rule is that the forced play falls out of two rules that already
The interesting property of the rule is that the forced play falls out of two rules that already
exist rather than needing a third:
1. a train card cannot be discarded, so it is not among the ways to shed a card; and
1. an undiscardable card is not among the ways to shed a card; and
2. `draw.end` already refuses while the hand is over the limit (§6.2).
A player holding four trains therefore has exactly one legal way to conclude the turn — play one —
without anything in the engine ever computing "you must play a train". The corner cannot lock a
player in, because **playing a train card is unconditionally legal**: `card.play`'s train case
A player holding four undiscardable trains therefore has exactly one legal way to conclude the turn —
play one — without anything in the engine ever computing "you must play a train". The corner cannot
lock a player in, because **playing a train card is unconditionally legal**: `card.play`'s train case
refuses only a board placement, and a train card played when the timetable is full still leaves the
hand (it simply schedules nothing). Confirmed by playing it: a hand of four trains offers zero
discards, no `draw.end`, and four plays.
hand (it simply schedules nothing). Confirmed by playing it: such a hand offers zero discards, no
`draw.end`, and four plays.
**Gitea#9 does not retire that corner, it narrows the way in.** With the setting on, the only hand
that reaches it is four Extras; with the setting off it is any four trains, exactly as before.
### One place decides, and the card says which rule refused
`keepReason` (`src/engine/apply.ts`) returns the sentence a player should read, or `null` if the card
may be discarded. `check`, the hand panel and the blocked "End Local Operations" button all ask it,
so none of them can drift from the rule. It returns a SENTENCE rather than a boolean because there
are now two distinct reasons — "an Extra is never discarded" and "not in this game" — and a panel
that hard-codes one of them tells half the players the wrong thing. It reaches the page as the
Frame's `handKeepWhy`.
The bot needed no rule of its own either. `legal.ts` enumerates candidates and filters them through
`check`, so the option stops being offered; and the developer bot already reaches for `card.play`