/* The syntax here is using an anonymous function to create a new
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-join", player_string);
+ const player_data = JSON.stringify((({id, name}) => ({id, name}))(new_player));
+ this.broadcast_event("player-join", player_data);
}
remove_player(id) {