From 35756d09d20985fb2b2600cc5418373731dbce36 Mon Sep 17 00:00:00 2001 From: Ashton Anderson Date: Sat, 7 Nov 2026 12:49:30 -0600 Subject: [PATCH] Bot or Not: show the game's result before the guess again Undoes the B18 part of 74a03c7. The score, the "white wins" banner, the move list's result line and the game log's result are shown from the start again, as before batch 3. Co-Authored-By: Claude Opus 5.5 --- src/components/Turing/TuringLog.tsx | 10 +++-- src/pages/turing.tsx | 67 +++++++++++++---------------- 2 files changed, 36 insertions(+), 41 deletions(-) diff --git a/src/components/Turing/TuringLog.tsx b/src/components/Turing/TuringLog.tsx index 20f9d0de..fceb6ccb 100644 --- a/src/components/Turing/TuringLog.tsx +++ b/src/components/Turing/TuringLog.tsx @@ -84,9 +84,13 @@ export const TuringLog: React.FC<{ embedded?: boolean }> = ({ ? 'White was the bot' : game.result?.bot === 'black' ? 'Black was the bot' - : // Not the game's result: it would give the - // answer away before the guess. - 'Awaiting your guess'} + : game.termination.winner === 'white' + ? 'White wins' + : game.termination.winner === 'black' + ? 'Black wins' + : game.termination.winner === 'none' + ? 'Draw' + : 'Game in progress'}

{game.result?.ratingDiff !== undefined && (
diff --git a/src/pages/turing.tsx b/src/pages/turing.tsx index da6e772f..fc1e3412 100644 --- a/src/pages/turing.tsx +++ b/src/pages/turing.tsx @@ -114,11 +114,6 @@ const Turing: React.FC = (props: Props) => { }, } - // The result stays hidden until the guess is in: who won, and how (a - // checkmate or a resignation), says much about which side was the bot. - const resultShown = !!game.result - const termination = resultShown ? game.termination : undefined - const launchContinue = useCallback(() => { const fen = controller.currentNode?.fen @@ -140,17 +135,15 @@ const Turing: React.FC = (props: Props) => { iconClassName="!text-xs" />
- {termination && ( - - {termination.winner === 'white' ? ( - 1 - ) : termination.winner === 'black' ? ( - 0 - ) : ( - ½ - )} - - )} + + {game.termination.winner === 'white' ? ( + 1 + ) : game.termination.winner === 'black' ? ( + 0 + ) : ( + ½ + )} +
@@ -161,28 +154,26 @@ const Turing: React.FC = (props: Props) => { iconClassName="!text-xs" />
- {termination && ( - - {termination.winner === 'black' ? ( - 1 - ) : termination.winner === 'white' ? ( - 0 - ) : ( - ½ - )} - - )} + + {game.termination.winner === 'black' ? ( + 1 + ) : game.termination.winner === 'white' ? ( + 0 + ) : ( + ½ + )} +
-
- - {termination - ? termination.winner !== 'none' - ? `${termination.winner} wins` - : 'draw' - : 'Result shown after your guess'} - -
+ {game.termination && ( +
+ + {game.termination.winner !== 'none' + ? `${game.termination.winner} wins` + : 'draw'} + +
+ )} ) @@ -234,7 +225,7 @@ const Turing: React.FC = (props: Props) => {
@@ -301,7 +292,7 @@ const Turing: React.FC = (props: Props) => {