summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
343a27a)
The judging phase is different than answering in that judging is
optional. So we can't rely on clients actually sending a "judging"
notification, (since they might just submit without having clicked on
any of the words). So instead, we set the start time for the judging
phase as soon as we enter that phase.
return a.toLowerCase().localeCompare(b.toLowerCase());
});
return a.toLowerCase().localeCompare(b.toLowerCase());
});
+ if (this.judging_start_time_ms === 0) {
+ this.judging_start_time_ms = Date.now();
+ }
+
this.broadcast_event_object('ambiguities', this.state.ambiguities);
}
this.broadcast_event_object('ambiguities', this.state.ambiguities);
}
}
receive_judging(prompt_id, session_id) {
}
receive_judging(prompt_id, session_id) {
const player = this.players_by_session[session_id];
if (! player)
return { valid: false, message: "Player not found" };
const player = this.players_by_session[session_id];
if (! player)
return { valid: false, message: "Player not found" };
}, PHASE_IDLE_TIMEOUT * 1000);
}
}, PHASE_IDLE_TIMEOUT * 1000);
}
- if (this.judging_start_time_ms === 0)
- this.judging_start_time_ms = Date.now();
-
/* Notify all players this this player is actively judging. */
this.state.players_judging.add(player.name);
this.broadcast_event_object('player-judging', player.name);
/* Notify all players this this player is actively judging. */
this.state.players_judging.add(player.name);
this.broadcast_event_object('player-judging', player.name);