From: Carl Worth Date: Sat, 27 Jun 2020 15:00:20 +0000 (-0700) Subject: Only count players who participated in judging when determining quorum X-Git-Url: https://git.cworth.org/git?p=lmno-server;a=commitdiff_plain;h=2df6309b25756727b8e6d2e99aad7d729213dbfc;ds=sidebyside Only count players who participated in judging when determining quorum Players who are inactive, (whether they registered and then never submitted answers, or submitted answers but then didn't submit any judging results), should not be able to sway the results of the judging. This commit fixes the failing test case of the previous commit so that the entire test suite is passing once again. --- diff --git a/empathy.js b/empathy.js index 4fdd4b3..0ae52df 100644 --- a/empathy.js +++ b/empathy.js @@ -410,7 +410,7 @@ class Empathy extends Game { /* Perform a (non-strict) majority ruling on equivalencies, * dropping all that didn't get enough votes. */ - const quorum = Math.floor((this.players.length + 1)/2); + const quorum = Math.floor((this.state.players_judged.length + 1)/2); const agreed_equivalencies = Object.values(this.equivalencies).filter( eq => eq.count >= quorum);