From 27e7e39608987f6d354b0c9c52eee10e1fa31ba2 Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Tue, 26 May 2020 10:20:02 +0200 Subject: Fix race condition bewteen next turn and prepared move Resolves: https://github.com/joffrey-bion/seven-wonders/issues/24 --- sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/Reducers.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sw-ui') 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 } -- cgit