v0.7.2 — a leg that is part of the row, the deck the sheet prints, regions not miles per hour, and a Division you read left to right
Gitea#17 — a 45° leg is an end of the west-to-east row, so backing into a cut through a curve's south leg no longer couples it back to front. The same assumption left a crew's own cut standing when it pulled out through a leg, which is the "cars left behind" report we had failed to reproduce. Gitea#14 — every count is docs/Deck cards5.xlsx. Track halved, and the Q12 office doubling and Gap 12 industry tripling both come out with it: they were measured against a deck with twice the track, and keeping them at the sheet's track count wipes out the reefer chain entirely. 84 rows now match card for card; the ten Safety, Event and Inspection cards it adds are not built and are held out. Cards the sheet no longer lists are dealt zero copies rather than deleted, so their rules stay implemented. Gitea#15 — RAR reversed it: a rail may stop dead against its neighbour and the placement is legal. What must hold is that no train crosses the gap, which was already true and is now pinned against the reported board. Gitea#3 — the printed speeds are scenery. A card costs one Stage per printed region and where a train STARTS is what varies; Fast/Slow is read on Hilly alone. Entering a one-region card behind another is a collision now, which is what ABS exists to prevent, and ABS no longer holds trains silently. Gitea#18 — the Division draws as one row, west to east, with no office-area detail. East is finally always to the right. Closes #3 Closes #14 Closes #15 Closes #17 Closes #18
This commit is contained in:
+12
-9
@@ -771,22 +771,25 @@ export function standingSides(
|
||||
}
|
||||
|
||||
/**
|
||||
* The cut a train would run into if it left this card through `exit` — the cars between it and that
|
||||
* end of the card.
|
||||
* The cut a train would run into if it left this card by the `exit` END OF THE ROW — the cars
|
||||
* between it and that end. Returned in the order the train MEETS them, nearest first, which is what
|
||||
* `carsCoupled` wants.
|
||||
*
|
||||
* Only 'e' and 'w' can hold a cut: the array is a west-to-east row, so a train leaving north or
|
||||
* south off a curve or a spur is not running along it and meets nothing. Returned in the order the
|
||||
* train MEETS them, nearest first, which is what `carsCoupled` wants.
|
||||
* `exit` IS AN END OF THE ROW, NOT A PORT. It used to be a raw `Port`, and answered "you meet
|
||||
* nothing" for north and south on the reasoning that a leg leaving through an edge is not running
|
||||
* along the west-to-east row. It is: a `sw` curve's south leg IS the east end of that row, so a
|
||||
* crew standing on the curve pulled out through the leg and drove away leaving the cars beside it
|
||||
* standing, against §A.4's mandatory coupling (Gitea#17). Callers resolve the leg with `rowEndAt`
|
||||
* (`track.ts`), which lives there because only the card's arc can say which end a leg is — and the
|
||||
* narrowed type is what makes every caller do it.
|
||||
*/
|
||||
export function cutTowards(
|
||||
tray: { standingWest?: number | undefined },
|
||||
cars: readonly RollingStock[],
|
||||
exit: 'n' | 's' | 'e' | 'w',
|
||||
exit: 'e' | 'w',
|
||||
): RollingStock[] {
|
||||
const { west, east } = standingSides(tray, cars);
|
||||
if (exit === 'e') return east;
|
||||
if (exit === 'w') return [...west].reverse();
|
||||
return [];
|
||||
return exit === 'e' ? east : [...west].reverse();
|
||||
}
|
||||
|
||||
export function turnOf(s: GameState, player: PlayerIndex): TurnState {
|
||||
|
||||
Reference in New Issue
Block a user