summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoffrey-bion <joffrey.bion@gmail.com>2021-02-11 16:03:22 +0100
committerjoffrey-bion <joffrey.bion@gmail.com>2021-02-11 16:03:22 +0100
commitc6172b613a8f0c8ab5b56e7a3adc3d59c724aea3 (patch)
treee75addcd08c24995dbe4c6d6ad92aec67398ba06
parentFix board summaries (again!) (diff)
downloadseven-wonders-c6172b613a8f0c8ab5b56e7a3adc3d59c724aea3.tar.gz
seven-wonders-c6172b613a8f0c8ab5b56e7a3adc3d59c724aea3.tar.bz2
seven-wonders-c6172b613a8f0c8ab5b56e7a3adc3d59c724aea3.zip
Fix pulsing red (remove incorrect preparedMove field)
-rw-r--r--sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/Moves.kt1
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt2
-rw-r--r--sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt2
3 files changed, 1 insertions, 4 deletions
diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/Moves.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/Moves.kt
index aff8b313..a1b3cb4e 100644
--- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/Moves.kt
+++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/Moves.kt
@@ -37,7 +37,6 @@ data class PlayerTurnInfo(
val table: TableState,
val action: Action,
val hand: List<HandCard>?,
- val preparedMove: PlayedMove?,
val neighbourGuildCards: List<HandCard>,
val discardedCards: List<HandCard>?, // only present when the player can actually see them
val scoreBoard: ScoreBoard? = null,
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt
index b6cb3c90..9043dded 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt
@@ -6,7 +6,6 @@ import org.luxons.sevenwonders.engine.cards.Card
import org.luxons.sevenwonders.engine.cards.Decks
import org.luxons.sevenwonders.engine.cards.Hands
import org.luxons.sevenwonders.engine.converters.toHandCards
-import org.luxons.sevenwonders.engine.converters.toPlayedMove
import org.luxons.sevenwonders.engine.converters.toTableState
import org.luxons.sevenwonders.engine.data.LAST_AGE
import org.luxons.sevenwonders.engine.effects.SpecialAbility
@@ -68,7 +67,6 @@ class Game internal constructor(
table = newTableState,
action = action,
hand = hand,
- preparedMove = preparedMoves[player.index]?.toPlayedMove(),
discardedCards = discardedCards.toHandCards(player, true).takeIf { action == Action.PLAY_FREE_DISCARDED },
neighbourGuildCards = table.getNeighbourGuildCards(player.index).toHandCards(player, true),
)
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 9c1c852a..001c862d 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
@@ -95,7 +95,7 @@ private class GameScene(props: GameSceneProps) : RComponent<GameSceneProps, RSta
private fun PlayerTurnInfo.everyoneIsWaitingForMe(): Boolean {
val onlyMeInTheGame = props.players.count { it.isHuman } == 1
- if (onlyMeInTheGame || preparedMove != null) {
+ if (onlyMeInTheGame || props.preparedMove != null) {
return false
}
val gameState = props.gameState ?: return false
bgstack15