v0.3.0 — playtest fixes, two new rules, and §7 enforced

This commit is contained in:
Jesse
2026-08-12 21:08:28 -04:00
parent 6ead39c530
commit 1bf1e95058
38 changed files with 8514 additions and 5989 deletions
+31 -7
View File
@@ -10,7 +10,7 @@ train into an occupied Subdivision. Get that wrong and two trains meet at speed.
## Status
**v0.1.0 — solitaire is playable in a browser.** The whole game runs client-side: the engine is pure,
**v0.3.0 — solitaire is playable in a browser.** The whole game runs client-side: the engine is pure,
imports nothing outside itself, and never touches `Math.random`, so a static host is all it needs.
- **Rules** — fully specified. Ten gaps in the original prototype rules found and resolved.
@@ -22,8 +22,10 @@ imports nothing outside itself, and never touches `Math.random`, so a static hos
no server, no turn submission and no per-player view), the 22 opponent-directed cards, and real
audio.
Balance is *not* where it should be: the developer bot averages 1.4 Revenue against a target of 20.
`TODO.md` says why, and says which of it is the bot and which is the deck.
Balance is *not* where it should be: the developer bot averages 7.0 Revenue against a target of 20 —
of which ~5.4 is the "one Revenue per train that clears your section" rule, so the working freight
and passenger economy is still only ~2. `TODO.md` says why, and says which of it is the bot and which
is the deck.
Versions follow the convention at the top of [`CHANGELOG.md`](CHANGELOG.md): third digit for fixes,
second for a set of features, 1.0 for the first release that deserves the name.
@@ -94,13 +96,35 @@ is the thing this machinery exists to prevent.
- **State is `fold(events)`.** The event log is the source of truth, which is what gives reconnection,
restart recovery and post-game replay from a single decision.
- **Never call `Math.random()`.** One ambient random call silently breaks replay.
- **Track is a deck card.** 104 of the 243 cards in the Home Office deck are track — the largest
category — so a district is built from what you draw, and building it costs you the industry or
train you drew instead. There is no separate supply and no one-piece-a-turn cap.
- **Track is a deck card, but the opening district is dealt.** 96 of the 235 cards are track — the
largest category — so a district is built from what you draw, and building it costs you the
industry or train you drew instead. The one exception is setup: track is shuffled separately and
each player is dealt **3 track + 3 other**, with the leftover track shuffled back in afterwards.
You therefore open holding six against a limit of three, and the first turn is spent choosing.
Provisional — see `TODO.md`.
- **Clearing the line scores.** Every train highballed out of your Office earns one Revenue, paid
once. It is worth +5.4 a game, more than the entire freight and passenger economy put together,
and it pays for traffic you do not have to work. Also provisional.
- **A turnout can be laid on top of a card already down.** It upgrades a straight at any rotation, or
a curve whose arc matches its own diverging leg — both strict port supersets of what they replace,
so an upgrade can never sever an existing join. Without it a district could only hang off track that
happened to be a turnout when it went down. Blocked by a standing car or a built Enhancement; the
replaced card leaves play, as board cards always do. `checkTurnoutUpgrade` in `src/engine/apply.ts`.
- **A Subdivision is the unit of clearance, not a card.** §8.1 asks whether the next *Subdivision*
holds an opposing train (an absolute bar) or a following one (the Superintendent's call). Every
Office starts as a Whistle Post, which is not a Control Point, so the whole railroad begins as ONE
Subdivision — that is why early traffic is so constrained, and why upgrading an Office to a Control
Point splits one in two and buys capacity. `subdivisions()` in `src/engine/state.ts`.
- **A Passenger Facility handles no freight, structurally.** `menAtWork` is `null` on a Depot, Station
or Terminal rather than an unused array, so freight work is refused on the shape of the facility and
no renderer can draw a pipeline that cannot exist. The converse holds: industries carry no porters.
- **The track is 45° geometry, not a graph on a grid.** Measured off `docs/tracks.png`: the through
rail runs east–west across the *exact vertical middle* of every card, there is no north–south track
anywhere, and everything that leaves through the north or south edge does so at **45°, through the
middle of that edge**. So two ports meeting is not enough to make a rail — two 45° legs can meet at
the same point and still form a V. Adjacency is `joins()` in `src/engine/track.ts`, never a bare
pair of `hasPort()` calls. A printed card turns 180° but never flips, so its handedness fixes which
diagonal its leg lies on for good, and a run-around needs one card of each hand.
diagonal its leg lies on for good, and a run-around needs one card of each hand. **Left is `nw_se`**
— named from the points, the side a train entering a turnout sees its diverging route leave toward,
with curves following the turnout whose leg they continue. Both tables had it inverted until
playtesting caught it; the geometry was never wrong, only the words.