diff options
author | Joffrey Bion <joffrey.bion@booking.com> | 2020-05-26 10:20:02 +0200 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@booking.com> | 2020-05-26 10:20:02 +0200 |
commit | 27e7e39608987f6d354b0c9c52eee10e1fa31ba2 (patch) | |
tree | afd1fcdf745cbd51d1f324230e95be03e68b7041 /sw-ui/src/main/kotlin/org | |
parent | Make bots explore more by choosing random cards instead of first (diff) | |
download | seven-wonders-27e7e39608987f6d354b0c9c52eee10e1fa31ba2.tar.gz seven-wonders-27e7e39608987f6d354b0c9c52eee10e1fa31ba2.tar.bz2 seven-wonders-27e7e39608987f6d354b0c9c52eee10e1fa31ba2.zip |
Fix race condition bewteen next turn and prepared move
Resolves:
https://github.com/joffrey-bion/seven-wonders/issues/24
Diffstat (limited to 'sw-ui/src/main/kotlin/org')
-rw-r--r-- | sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/Reducers.kt | 3 |
1 files changed, 2 insertions, 1 deletions
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 c21f6deb..1ff0d0ec 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 @@ -78,7 +78,8 @@ private fun gameStateReducer(gameState: GameState?, action: RAction): GameState? }) is TurnInfoEvent -> gameState?.copy( players = gameState.players.map { p -> p.copy(isReady = false) }, - turnInfo = action.turnInfo + turnInfo = action.turnInfo, + currentPreparedMove = null ) else -> gameState } |