From: Carl Worth Date: Sat, 27 Jun 2020 14:44:31 +0000 (-0700) Subject: Add all players who have answered as "judging" when judging phase starts X-Git-Url: https://git.cworth.org/git?p=lmno-server;a=commitdiff_plain;h=aa245121ee40c82e9d96b246ab1fc63cb5fabc5f Add all players who have answered as "judging" when judging phase starts The rationale for this change is explained more fully in the commit message of the previous commit. This change fixes the failing test case added in the previous commit so the test suite now entirely passes again. --- diff --git a/empathy.js b/empathy.js index 35d5fc7..4fdd4b3 100644 --- a/empathy.js +++ b/empathy.js @@ -266,6 +266,12 @@ class Empathy extends Game { } this.broadcast_event_object('ambiguities', this.state.ambiguities); + + /* Notify all players of every player that is judging. */ + for (let player_name of this.state.players_answered) { + this.state.players_judging.add(player_name); + this.broadcast_event_object('player-judging', player_name); + } } reset_judging_timeout() {