From 4ba2c894caa76db0944825ca2460a13e6924f69a Mon Sep 17 00:00:00 2001 From: Inga Date: Wed, 20 Nov 2024 03:53:37 +0000 Subject: [PATCH] minor ui improvement --- src/backend/components/boardgame.tsx | 2 +- src/frontend/static/style.css | 1 + src/shared/display.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/components/boardgame.tsx b/src/backend/components/boardgame.tsx index 4a0b3ad..9d5a95b 100644 --- a/src/backend/components/boardgame.tsx +++ b/src/backend/components/boardgame.tsx @@ -54,7 +54,7 @@ export const getBoardgameHtml = (key: string, gameState: BoardgameStateType, gam return (
-

+

Current player: {gameState.currentPlayerName}

diff --git a/src/frontend/static/style.css b/src/frontend/static/style.css index 4de5f61..25d5b7d 100644 --- a/src/frontend/static/style.css +++ b/src/frontend/static/style.css @@ -33,6 +33,7 @@ li form { board-game:not(.outcome-winx) .when-outcome-winx, board-game:not(.outcome-wino) .when-outcome-wino, board-game:not(.outcome-draw) .when-outcome-draw, +board-game:not(.outcome-undecided) .when-outcome-undecided, board-game:not(.autoplayer-x-enabled) .when-autoplayer-x-enabled, board-game:not(.autoplayer-x-disabled) .when-autoplayer-x-disabled, board-game:not(.autoplayer-o-enabled) .when-autoplayer-o-enabled, diff --git a/src/shared/display.ts b/src/shared/display.ts index 7adc49b..ef202f2 100644 --- a/src/shared/display.ts +++ b/src/shared/display.ts @@ -4,6 +4,7 @@ export const getDisplayStates = (gameState: BoardgameStateType, currentOutcome: "outcome-winx": currentOutcome === CurrentOutcome.WinX, "outcome-wino": currentOutcome === CurrentOutcome.WinO, "outcome-draw": currentOutcome === CurrentOutcome.Draw, + "outcome-undecided": currentOutcome === CurrentOutcome.Undecided, "autoplayer-x-enabled": gameState.autoPlayers.has(Player.X), "autoplayer-x-disabled": !gameState.autoPlayers.has(Player.X), "autoplayer-o-enabled": gameState.autoPlayers.has(Player.O),