From 880667b80e4a1a1674903fa5adb722b7ac1a02cf Mon Sep 17 00:00:00 2001 From: Joel Therrien Date: Sat, 23 Sep 2023 12:20:52 -0700 Subject: [PATCH] Remove turn log message after game over --- ui/src/Game.tsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ui/src/Game.tsx b/ui/src/Game.tsx index daa936f..27ba994 100644 --- a/ui/src/Game.tsx +++ b/ui/src/Game.tsx @@ -370,14 +370,15 @@ export function Game(props: { } useEffect(() => { - logDispatch(

Turn {turnCount}

); - logDispatch(
{playerTurnName}'s turn
) - setConfirmedScorePoints(-1); - trayDispatch({action: TileDispatchActionType.RETRIEVE}); - if(playerTurnName != props.settings.playerName && !isGameOver) { - runAI(); + if(!isGameOver){ + logDispatch(

Turn {turnCount}

); + logDispatch(
{playerTurnName}'s turn
) + setConfirmedScorePoints(-1); + trayDispatch({action: TileDispatchActionType.RETRIEVE}); + if(playerTurnName != props.settings.playerName && !isGameOver) { + runAI(); + } } - }, [turnCount]);