logo, fix db loading

This commit is contained in:
Theo Browne
2026-02-20 04:49:40 -08:00
parent 593ad125ff
commit 77f68d440c
9 changed files with 656 additions and 720 deletions

11
game.ts
View File

@@ -261,7 +261,14 @@ export async function runGame(
state: GameState,
rerender: () => void,
) {
for (let r = 1; r <= runs; r++) {
let startRound = 1;
if (state.completed.length > 0) {
startRound = state.completed[state.completed.length - 1].num + 1;
}
const endRound = startRound + runs - 1;
for (let r = startRound; r <= endRound; r++) {
while (state.isPaused) {
await new Promise((resolve) => setTimeout(resolve, 1000));
}
@@ -270,7 +277,7 @@ export async function runGame(
const prompter = shuffled[0]!;
const contA = shuffled[1]!;
const contB = shuffled[2]!;
const voters = shuffled.slice(3);
const voters = [prompter, ...shuffled.slice(3)];
const now = Date.now();
const round: RoundState = {