Say who is playing, what you can press, and where you are in the Stage

Mostly presentation, plus one rules fix found on the way.
This commit is contained in:
Jesse
2026-08-04 08:37:42 -04:00
parent 982952fd6c
commit ec792dfc15
12 changed files with 392 additions and 62 deletions
+6 -3
View File
@@ -111,6 +111,8 @@ export type Frame = {
stage: number;
clock: string;
phase: string;
/** The raw phase, so a caller can mark WHICH of the five is current without parsing the label. */
phaseKey: string;
actor: number | null;
superintendent: number;
revenue: number;
@@ -332,11 +334,11 @@ export function describeIntent(s: GameState, i: Intent): string {
case 'draw.fromHomeOffice':
return `draw blind from the Home Office deck (${s.decks.homeOffice.length} left)`;
case 'draw.end':
return 'done drawing — end my turn';
return 'End my turn';
case 'switch.end':
return 'done switching — end my turn';
return 'End my switching turn';
case 'loadUnload.end':
return 'done working — end the Load/Unload phase';
return 'End my Cargo phase';
case 'newTrain.passCar':
return 'add no more cars to this train';
case 'newTrain.secondSection':
@@ -459,6 +461,7 @@ export function snapshot(
stage: s.clock.stage,
clock: clockTime(s.clock.stage),
phase: phaseLabel(s.clock.phase),
phaseKey: s.clock.phase,
actor: s.clock.currentActor,
superintendent: s.clock.superintendent,
revenue: s.players[0]?.revenue ?? 0,