From 79610b958b5072c890425fadb7c3063f83474331 Mon Sep 17 00:00:00 2001 From: Joel Therrien Date: Mon, 25 Sep 2023 20:50:58 -0700 Subject: [PATCH] Fix end-of-game UI bugs --- ui/src/Game.tsx | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/ui/src/Game.tsx b/ui/src/Game.tsx index 27ba994..51f476a 100644 --- a/ui/src/Game.tsx +++ b/ui/src/Game.tsx @@ -370,11 +370,11 @@ export function Game(props: { } useEffect(() => { + trayDispatch({action: TileDispatchActionType.RETRIEVE}); + setConfirmedScorePoints(-1); if(!isGameOver){ logDispatch(

Turn {turnCount}

); - logDispatch(
{playerTurnName}'s turn
) - setConfirmedScorePoints(-1); - trayDispatch({action: TileDispatchActionType.RETRIEVE}); + logDispatch(
{playerTurnName}'s turn
); if(playerTurnName != props.settings.playerName && !isGameOver) { runAI(); } @@ -421,7 +421,7 @@ export function Game(props: { {props.settings.aiName} has {remainingAITiles} tiles - -