object from new_player with just the subset of fields that we
want. */
const player_string = JSON.stringify((({id, name}) => ({id, name}))(new_player));
- this.broadcast_event("player-register", player_string);
+ this.broadcast_event("player-join", player_string);
}
remove_player(id) {
const index = this._players.findIndex(player => player.id === id);
this._players.splice(index, 1);
- this.broadcast_event("player-deregister", `{"id": ${id}}`);
+ this.broadcast_event("player-leave", `{"id": ${id}}`);
}
remove_all_players() {