Remove turn log message after game over

This commit is contained in:
Joel Therrien 2023-09-23 12:20:52 -07:00
parent 2fa28ce3d4
commit 880667b80e

View file

@ -370,14 +370,15 @@ export function Game(props: {
}
useEffect(() => {
logDispatch(<h4>Turn {turnCount}</h4>);
logDispatch(<div>{playerTurnName}'s turn</div>)
setConfirmedScorePoints(-1);
trayDispatch({action: TileDispatchActionType.RETRIEVE});
if(playerTurnName != props.settings.playerName && !isGameOver) {
runAI();
if(!isGameOver){
logDispatch(<h4>Turn {turnCount}</h4>);
logDispatch(<div>{playerTurnName}'s turn</div>)
setConfirmedScorePoints(-1);
trayDispatch({action: TileDispatchActionType.RETRIEVE});
if(playerTurnName != props.settings.playerName && !isGameOver) {
runAI();
}
}
}, [turnCount]);