Fixing end of action string in multiplayer interaction.

logins
Thomas Hintz 5 years ago
parent ade9e16c74
commit f6d893eb60

@ -51,6 +51,12 @@ function handleMessage(evt) {
data.game.currentPlayer !== store.getState().farm.game.currentPlayer) {
store.dispatch(alert(ALERTS.otherPlayersTurn));
}
// new turn clear actions
if (data.event === 'update' &&
data.game.currentPlayer !== store.getState().farm.game.currentPlayer) {
store.dispatch(setNextAction(false, false));
store.dispatch(nextUIAction());
}
store.dispatch(updatePlayer(data.player));
if (data.event === 'init') {
store.dispatch(movePlayer(data.player.space, 0, data.player.color));

Loading…
Cancel
Save