answers: answers
});
- /* And notify all players that this player has answered. */
+ /* Update state (to be sent out to any future clients) */
+ this.state.players_answering.delete(player.name);
this.state.players_answered.push(player.name);
+
+ /* And notify all players that this player has answered. */
this.broadcast_event_object('player-answered', player.name);
return { valid: true };
}
}
- /* And notify all players this this player has judged. */
+ /* Update state (to be sent out to any future clients) */
+ this.state.players_judging.delete(player.name);
this.state.players_judged.push(player.name);
+
+ /* And notify all players this this player has judged. */
this.broadcast_event_object('player-judged', player.name);
return { valid: true };
else
response.sendStatus(404);
- if (game.state.end_judging.size > (game.state.players_judged.length / 2))
+ if (game.state.end_judging.size > (game.state.players_answered.length / 2))
game.compute_scores();
});