From bbd7f606dc943cb77c4bb146fe8fe9931eff7d37 Mon Sep 17 00:00:00 2001 From: snen Date: Thu, 30 Sep 2021 22:33:20 -0400 Subject: [PATCH] Show current power and add win/lose message --- client/game/BoardSlot.tsx | 17 ++++++++++------- client/game/Game.tsx | 26 +++++++++++++++++++++----- client/styles.css | 6 ++++++ 3 files changed, 37 insertions(+), 12 deletions(-) diff --git a/client/game/BoardSlot.tsx b/client/game/BoardSlot.tsx index dcea71c..dbee103 100644 --- a/client/game/BoardSlot.tsx +++ b/client/game/BoardSlot.tsx @@ -19,7 +19,7 @@ export default function BoardSlot(props: CardTokenProps): JSX.Element { return ( } - {isMyTurn && hasDrawn && } - + {maybeIsGameWinner === null ? ( +
+

{isMyTurn ? 'My' : 'Enemy'} Turn

+ {isMyTurn && canDraw && } + {isMyTurn && hasDrawn && } +
+ ) : ( +
+ {maybeIsGameWinner ? "You Lose!" : "You Win!"} +
+ )}

Life: {player.life}

Deck: {deckSize}

diff --git a/client/styles.css b/client/styles.css index dbea776..987b2fb 100644 --- a/client/styles.css +++ b/client/styles.css @@ -196,6 +196,12 @@ h2 { } .board-slot { + display: flex; + flex-direction: column; + align-items: center; +} + +.board-card { width: 5em; height: 7em; margin: 0 1em;