auto refresh

This commit is contained in:
Theo Browne
2026-02-22 03:12:44 -08:00
parent a7b2a24f02
commit deeeeae8f7
3 changed files with 15 additions and 0 deletions

View File

@@ -14,6 +14,8 @@ import {
type RoundState,
} from "./game.ts";
const VERSION = crypto.randomUUID().slice(0, 8);
// ── Game state ──────────────────────────────────────────────────────────────
const runsArg = process.argv.find((a) => a.startsWith("runs="));
@@ -225,6 +227,7 @@ function broadcast() {
data: gameState,
totalRounds: runs,
viewerCount: clients.size,
version: VERSION,
});
for (const ws of clients) {
ws.send(msg);