Fixing end of action string in multiplayer interaction.
This commit is contained in:
@@ -51,6 +51,12 @@ function handleMessage(evt) {
|
|||||||
data.game.currentPlayer !== store.getState().farm.game.currentPlayer) {
|
data.game.currentPlayer !== store.getState().farm.game.currentPlayer) {
|
||||||
store.dispatch(alert(ALERTS.otherPlayersTurn));
|
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));
|
store.dispatch(updatePlayer(data.player));
|
||||||
if (data.event === 'init') {
|
if (data.event === 'init') {
|
||||||
store.dispatch(movePlayer(data.player.space, 0, data.player.color));
|
store.dispatch(movePlayer(data.player.space, 0, data.player.color));
|
||||||
|
|||||||
Reference in New Issue
Block a user