From 752e06d579e8a81319014e249cd329e6ecf769b2 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Sun, 8 Mar 2026 11:58:13 -0400 Subject: [PATCH] anagrams: Send words/letters being claimed So that clients can display an in-progress claim to make it clear what's happening. --- anagrams.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/anagrams.js b/anagrams.js index ddfe846..7847df7 100644 --- a/anagrams.js +++ b/anagrams.js @@ -749,13 +749,18 @@ class Anagrams extends Game { remaining: this.state.bag.length })}\n\n`); - /* Send active claim state if any. */ + /* Send active claim state if any, including items already claimed. */ if (this.state.claim_queue.length > 0) { const claimer = this.active_claimer_player(); response.write(`event: claim-start\ndata: ${JSON.stringify({ player_name: claimer ? claimer.name : "Unknown", timeout_ms: 0, - warning_ms: 0 + warning_ms: 0, + claimed_letters: this.state.claimed_letters, + claimed_words: this.state.claimed_words.map(cw => ({ + word: cw.word_obj.word, + word_id: cw.word_id + })) })}\n\n`); } -- 2.45.2