That's probably not quite the information the client _really_ wants,
(since it probably wants to at least show the names of those who
haven't submitted yet), but it at least gives the client _some_
information that's not static.
super(id);
this.state = {
prompts: [],
- active_prompt: null
+ active_prompt: null,
+ players_answered: 0
};
this.answers = [];
this.next_prompt_id = 1;
answers: answers
});
+ /* And notify players how many players have answered. */
+ this.state.players_answered++;
+
+ this.broadcast_event_object('answered', this.state.players_answered);
+
return { valid: true };
}
}