From 76717cf52e25d99a6fa39de11d15cfe090e83d27 Mon Sep 17 00:00:00 2001 From: "claude (blind_chess)" Date: Mon, 18 May 2026 19:58:48 -0400 Subject: [PATCH] docs(server): correct translateMove audience docs after the 'both' change Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/server/src/commit.ts | 2 +- packages/server/src/translator.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/server/src/commit.ts b/packages/server/src/commit.ts index aeaf6a5..3636163 100644 --- a/packages/server/src/commit.ts +++ b/packages/server/src/commit.ts @@ -112,7 +112,7 @@ function announceWith( text: 'no_such_piece' | 'no_legal_moves' | 'wont_help' | 'illegal_move', ): CommitResult { const ply = game.chess.history().length; - // Feature 1: attempted moves are announced to both players. + // Attempted moves are part of the shared moderator transcript — both players hear them. const a = announce(text, 'both', ply); game.announcements.push(a); return { kind: 'announce', announcements: [a] }; diff --git a/packages/server/src/translator.ts b/packages/server/src/translator.ts index f5e7ab8..1cddc32 100644 --- a/packages/server/src/translator.ts +++ b/packages/server/src/translator.ts @@ -14,10 +14,11 @@ export function announce( /** * Translate an applied chess.js Move into the moderator vocabulary. * - * Capturing player learns the captured piece type via their `view` update - * (their canonical board reflects the capture; the captured-pieces tray is - * populated from move history). The opponent gets only the `*_moved_captured` - * announcement. + * Every announcement is emitted with audience 'both' — the moderator speaks + * each event aloud and both players hear it. Move events carry no square + * coordinates, so a player learns *that* the opponent moved / captured / + * castled, never *where*. The capturing player additionally sees the capture + * reflected in their own view update. */ export function translateMove(game: Game, move: Move): Announcement[] { const out: Announcement[] = []; @@ -33,8 +34,7 @@ export function translateMove(game: Game, move: Move): Announcement[] { const isQueensideCastle = move.isQueensideCastle(); const isProm = !!move.promotion; - // To both players: the move event itself (Feature 1 — the moderator - // announces every move aloud; both players hear it). + // The move event itself — the moderator announces every move aloud, so both players hear it. if (isKingsideCastle) { out.push(announce(`${moverWord}_castled_kingside` as ModeratorText, 'both', ply)); } else if (isQueensideCastle) {