]> git.cworth.org Git - lmno-server/commit
empathy: Don't count inactive players to advance from answering phase
authorCarl Worth <cworth@cworth.org>
Sat, 27 Jun 2020 16:25:20 +0000 (09:25 -0700)
committerCarl Worth <cworth@cworth.org>
Sat, 27 Jun 2020 16:26:15 +0000 (09:26 -0700)
commitca261367bfa9dbb281a09547548c6695df91bb86
tree5416cd11d5b59cbb102f9f8722b3b6cfeddf802f
parent13f2a95476240fd9049008d1a5a5f8711b39c3fd
empathy: Don't count inactive players to advance from answering phase

This commit implements the desired behavior described in the previous
commit message. The test case that was added in that commit now
passes, (as does the entire test suite).

In the implementation here, we need a count of all player that have
the active property set to true. Instead of looping over the array and
counting this, we have the Game class track this count as players are
added and removed.
empathy.js
game.js