From 1436794fd23df9bcdda172fd1bcb4ff07b16fe3e Mon Sep 17 00:00:00 2001 From: joffrey-bion Date: Wed, 10 Feb 2021 01:21:34 +0100 Subject: Fix non-neighbour boards order Resolves: https://github.com/joffrey-bion/seven-wonders/issues/106 --- .../org/luxons/sevenwonders/ui/components/game/GameScene.kt | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'sw-ui/src/main/kotlin/org/luxons') 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 e9b7b5ad..2dd6135a 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 @@ -4,7 +4,6 @@ import com.palantir.blueprintjs.* import kotlinx.css.* import kotlinx.css.properties.transform import kotlinx.css.properties.translate -import kotlinx.html.DIV import org.luxons.sevenwonders.model.* import org.luxons.sevenwonders.model.api.PlayerDTO import org.luxons.sevenwonders.model.boards.Board @@ -13,7 +12,6 @@ import org.luxons.sevenwonders.model.cards.HandCard import org.luxons.sevenwonders.ui.components.GlobalStyles import org.luxons.sevenwonders.ui.redux.* import react.* -import styled.StyledDOMBuilder import styled.css import styled.getClassName import styled.styledDiv @@ -56,9 +54,6 @@ private class GameScene(props: GameSceneProps) : RComponent.boardSummaries(leftBoard: Board, rightBoard: Board, topBoards: List) { - // TODO use blueprint popover with full board preview + private fun RBuilder.boardSummaries(turnInfo: PlayerTurnInfo) { + val leftBoard = turnInfo.getBoard(RelativeBoardPosition.LEFT) + val rightBoard = turnInfo.getBoard(RelativeBoardPosition.RIGHT) + val topBoards = turnInfo.getNonNeighbourBoards().reversed() leftPlayerBoardSummary(leftBoard) rightPlayerBoardSummary(rightBoard) if (topBoards.isNotEmpty()) { -- cgit