X-Git-Url: https://git.cworth.org/git?p=empires-server;a=blobdiff_plain;f=empathy.js;h=abaf72f247fc5f796a79e49df594e4702124e6c5;hp=ae400a6009709deceef876caa71343a1957a4d1a;hb=7a74c7c98826465f1cc0524f2717417df35a5097;hpb=c748592a7db27adebd48b45970b5f0ffbedb3300 diff --git a/empathy.js b/empathy.js index ae400a6..abaf72f 100644 --- a/empathy.js +++ b/empathy.js @@ -135,8 +135,11 @@ class Empathy extends Game { answers: answers }); - /* And notify all players that this player has answered. */ + /* Update state (to be sent out to any future clients) */ + this.state.players_answering.delete(player.name); this.state.players_answered.push(player.name); + + /* And notify all players that this player has answered. */ this.broadcast_event_object('player-answered', player.name); return { valid: true }; @@ -244,8 +247,11 @@ class Empathy extends Game { } } - /* And notify all players this this player has judged. */ + /* Update state (to be sent out to any future clients) */ + this.state.players_judging.delete(player.name); this.state.players_judged.push(player.name); + + /* And notify all players this this player has judged. */ this.broadcast_event_object('player-judged', player.name); return { valid: true };