]> git.cworth.org Git - empires-server/commitdiff
Add all players who have answered as "judging" when judging phase starts
authorCarl Worth <cworth@cworth.org>
Sat, 27 Jun 2020 14:44:31 +0000 (07:44 -0700)
committerCarl Worth <cworth@cworth.org>
Sat, 27 Jun 2020 14:44:55 +0000 (07:44 -0700)
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.

empathy.js

index 35d5fc7e737726f7426ff58d2c7950ae77fccc6a..4fdd4b329aa3eafeb39cf57c33df8fd953a65b7f 100644 (file)
@@ -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() {