Expand game engine, replay, tests, and documentation

This commit is contained in:
Jesse
2026-07-31 08:10:54 -04:00
parent e7bc07df85
commit 401b879140
30 changed files with 2253 additions and 552 deletions
+6
View File
@@ -133,6 +133,10 @@ function newTrainCandidates(s: GameState): Intent[] {
}
out.push({ type: 'newTrain.passCar', trayId });
}
const due = s.timetable[s.clock.stage - 1];
if (due !== null && due !== undefined) {
out.push({ type: 'newTrain.secondSection', trainNumber: due });
}
return out;
}
@@ -183,6 +187,8 @@ function placementCandidates(s: GameState, player: PlayerIndex): GridCoord[] {
{ row: row!, col: col! - 1 },
];
for (const c of around) {
// Q7 — a district hangs BELOW the Running Track; there is nothing above it.
if (c.row > area.runningRow) continue;
const k = `${c.row},${c.col}`;
if (area.grid.has(k) || seen.has(k)) continue;
seen.add(k);