The tally becomes a ledger of its own — and hotseat tables count
Instead of re-scanning every room's log on demand, stats.json now accumulates beside the room files: each room is remembered at its highest counted stage (created → started → finished), so boots and replays reconcile without double-counting, and the tally will survive any future pruning of old rooms. Finished games contribute their moves, table-time, and manner of victory exactly once, at the moment of victory. And with an accumulator to receive them, hotseat games finally count: each local game mints an anonymous id, pings "started" with its player count, tracks its own between-moves clock, and on the final move reports counts only — commands, minutes, players, win reason. No names, no moves leave the device. The server dedupes by id, clamps everything to sane ranges, and the booklet's tally now shows how many of the games were hotseat tables. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
85831828d7
commit
4114386ed8
@@ -376,6 +376,14 @@ class Net {
|
||||
this.send({ type: "stats" });
|
||||
}
|
||||
|
||||
/** Anonymous count-only ping so hotseat tables show in the tally. */
|
||||
reportHotseat(report: {
|
||||
id: string; stage: "started" | "finished";
|
||||
players?: number; commands?: number; minutes?: number; winReason?: string;
|
||||
}): void {
|
||||
this.send({ type: "hotseatReport", ...report });
|
||||
}
|
||||
|
||||
refreshGames(): void {
|
||||
if (this.seats.length > 0) this.send({ type: "myGames", seats: $state.snapshot(this.seats) });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user