send on transitions

This commit is contained in:
Theo Browne
2026-02-22 21:50:01 -08:00
parent 79f9dab7fb
commit ccaa86b4a6
2 changed files with 78 additions and 3 deletions

View File

@@ -272,7 +272,7 @@ export async function runGame(
runs: number,
state: GameState,
rerender: () => void,
onViewerVotingStart?: () => void,
onViewerVotingStart?: (round: RoundState) => void,
) {
let startRound = 1;
const lastCompletedRound = state.completed.at(-1);
@@ -403,7 +403,7 @@ export async function runGame(
round.viewerVotesA = 0;
round.viewerVotesB = 0;
round.viewerVotingEndsAt = Date.now() + 30_000;
onViewerVotingStart?.();
onViewerVotingStart?.(round);
rerender();
await Promise.all([