summaryrefslogtreecommitdiff
path: root/sw-ui
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@gmail.com>2021-02-23 00:25:32 +0100
committerJoffrey Bion <joffrey.bion@gmail.com>2021-02-23 18:38:24 +0100
commit15b27da0bfed0ed6abe0d3351b9f09a5904f293e (patch)
tree05f414b178814073923243fdfb7cc94da642d212 /sw-ui
parentFunnel game events into a single client subscription (diff)
downloadseven-wonders-15b27da0bfed0ed6abe0d3351b9f09a5904f293e.tar.gz
seven-wonders-15b27da0bfed0ed6abe0d3351b9f09a5904f293e.tar.bz2
seven-wonders-15b27da0bfed0ed6abe0d3351b9f09a5904f293e.zip
Cleanup self board summary
Diffstat (limited to 'sw-ui')
-rw-r--r--sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt5
1 files changed, 2 insertions, 3 deletions
diff --git a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt
index d26fc81d..ccbb2958 100644
--- a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt
+++ b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt
@@ -89,7 +89,6 @@ private class GameScene(props: GameSceneProps) : RComponent<GameSceneProps, RSta
if (turnInfo.action == Action.SAY_READY) {
sayReadyButton()
}
- selfBoardSummary(turnInfo)
}
}
@@ -133,6 +132,7 @@ private class GameScene(props: GameSceneProps) : RComponent<GameSceneProps, RSta
val leftBoard = turnInfo.getBoard(RelativeBoardPosition.LEFT)
val rightBoard = turnInfo.getBoard(RelativeBoardPosition.RIGHT)
val topBoards = turnInfo.getNonNeighbourBoards().reversed()
+ selfBoardSummary(turnInfo.getOwnBoard())
leftPlayerBoardSummary(leftBoard)
rightPlayerBoardSummary(rightBoard)
if (topBoards.isNotEmpty()) {
@@ -194,7 +194,7 @@ private class GameScene(props: GameSceneProps) : RComponent<GameSceneProps, RSta
}
}
- private fun RBuilder.selfBoardSummary(turnInfo: PlayerTurnInfo) {
+ private fun RBuilder.selfBoardSummary(board: Board) {
styledDiv {
css {
position = Position.absolute
@@ -203,7 +203,6 @@ private class GameScene(props: GameSceneProps) : RComponent<GameSceneProps, RSta
display = Display.flex
flexDirection = FlexDirection.row
}
- val board = turnInfo.getOwnBoard()
boardSummary(
player = props.players[board.playerIndex],
board = board, BoardSummarySide.BOTTOM,
bgstack15