From 2df6309b25756727b8e6d2e99aad7d729213dbfc Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Sat, 27 Jun 2020 08:00:20 -0700 Subject: [PATCH] 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. --- empathy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.43.0