Since TacTacToe, (and any future game), need this too.
This keepalive prevents Firefox (at least) from timing out on the
server-sent-events stream after the user is idle for two minutes.
this.next_player_id = 1;
this.characters_to_reveal = null;
this.phase = GamePhase.JOIN;
-
- /* Send a comment to every connected client every 15 seconds. */
- setInterval(() => {this.broadcast_string(":");}, 15000);
}
add_spectator(name, session_id) {
this.id = id;
this.clients = [];
this.next_client_id = 1;
+
+ /* Send a comment to every connected client every 15 seconds. */
+ setInterval(() => {this.broadcast_string(":");}, 15000);
}
/* Suport for game meta-data.