diff options
Diffstat (limited to 'sw-ui')
-rw-r--r-- | sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/ApiActions.kt | 4 | ||||
-rw-r--r-- | sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/Reducers.kt | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/ApiActions.kt b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/ApiActions.kt index 6fbaadb9..7badb11c 100644 --- a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/ApiActions.kt +++ b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/ApiActions.kt @@ -1,6 +1,6 @@ package org.luxons.sevenwonders.ui.redux -import org.luxons.sevenwonders.model.CustomizableSettings +import org.luxons.sevenwonders.model.Settings import org.luxons.sevenwonders.model.PlayerMove import redux.RAction @@ -14,7 +14,7 @@ data class RequestAddBot(val botDisplayName: String) : RAction data class RequestReorderPlayers(val orderedPlayers: List<String>) : RAction -data class RequestUpdateSettings(val settings: CustomizableSettings) : RAction +data class RequestUpdateSettings(val settings: Settings) : RAction class RequestStartGame : RAction diff --git a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/Reducers.kt b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/Reducers.kt index 1ff0d0ec..047e948a 100644 --- a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/Reducers.kt +++ b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/Reducers.kt @@ -71,7 +71,7 @@ private fun gameStateReducer(gameState: GameState?, action: RAction): GameState? is PreparedMoveEvent -> gameState?.copy(currentPreparedMove = action.move) is RequestUnprepareMove -> gameState?.copy(currentPreparedMove = null) is PreparedCardEvent -> gameState?.copy( - preparedCardsByUsername = gameState.preparedCardsByUsername + (action.card.player.username to action.card.cardBack) + preparedCardsByUsername = gameState.preparedCardsByUsername + (action.card.username to action.card.cardBack) ) is PlayerReadyEvent -> gameState?.copy(players = gameState.players.map { p -> if (p.username == action.username) p.copy(isReady = true) else p |