From: Carl Worth Date: Sun, 8 Mar 2026 18:14:32 +0000 (-0400) Subject: Use server as authoritative source of truth for tiles in the center X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=402c8489c040d664d6dccb919768d5d2ec310b97;p=lmno-server Use server as authoritative source of truth for tiles in the center Clients were trying to track the central state on their own and getting out of synch. Let's stick to "server as authoritative" as a principle. --- diff --git a/anagrams.js b/anagrams.js index 7847df7..f84437c 100644 --- a/anagrams.js +++ b/anagrams.js @@ -353,6 +353,10 @@ class Anagrams extends Game { reason }); + /* Broadcast authoritative state so clients resync. */ + this.broadcast_event_object("center", this.state.center); + this._broadcast_player_state(); + /* Activate next claimer if any. */ if (this.state.claim_queue.length > 0) { this._activate_claimer(); @@ -519,7 +523,8 @@ class Anagrams extends Game { reason: "accepted" }); - /* Broadcast full player words for state sync. */ + /* Broadcast authoritative state so clients resync. */ + this.broadcast_event_object("center", this.state.center); this._broadcast_player_state(); /* Activate next claimer if any. */