Turn zero's eyes belong to the first player, even in the whole tale

Eric caught the whole-game reel opening in the wrong head: turn zero's
turnStarted fires in the deal, before any step, so the boundary scan
found nothing and fell back to the share's pov prop — the WINNER, whose
eyes then watched the first player's whole turn from across the maze.
When no boundary precedes the current step, the owner is now read from
the reel's first turnEnded, which turn zero always contains.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Eric Wagoner
2026-08-23 21:01:25 -04:00
co-authored by Claude Fable 5
parent c4337e3a7b
commit f5151a0c99
+9
View File
@@ -68,6 +68,15 @@
}
}
}
// No boundary yet: these are the FIRST turn's steps, whose opening
// turnStarted fired in the deal before any command. Its owner is
// whoever the reel's first turnEnded names.
for (const st of steps) {
for (const e of st.events) {
if (e.type === "turnEnded" && "player" in e) return (e as { player: string }).player;
if (e.type === "turnStarted" || e.type === "extraTurnStarted") break;
}
}
return pov ?? steps[0]!.view.you;
});
const step = $derived(steps[Math.min(idx, steps.length - 1)]!);