Only consider active players when counting players needed for prompt voting
authorCarl Worth <cworth@cworth.org>
Tue, 30 Jun 2020 00:05:17 +0000 (17:05 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 30 Jun 2020 00:05:17 +0000 (17:05 -0700)
Now that the server is sending us inactive players, we don't want to
consider them when computing how many votes we need to go forward with
a category.

empathy/empathy.jsx

index 3e6399d19c5aa997a4a9eecfa6912556ce663164..7ac92e01e4532eb35bd73fd2c878afca01fcc597 100644 (file)
@@ -1357,7 +1357,7 @@ class Game extends React.PureComponent {
       />,
       <LetsPlay
         key="lets-play"
-        num_players={1+state.other_players.length}
+        num_players={1+state.other_players.filter(p => p.active).length}
         prompts={state.prompts}
       />,
       <PromptOptions