Add function to update the player's socket ID.
This commit is contained in:
parent
e7f8a5462a
commit
1a030411c4
1 changed files with 4 additions and 0 deletions
|
|
@ -56,6 +56,10 @@ export class Game {
|
||||||
this.player_len++;
|
this.player_len++;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public update_socket(player: string, socket: string): void {
|
||||||
|
this._players[player].socket = socket;
|
||||||
|
};
|
||||||
|
|
||||||
public remove_player(player: string, ban: boolean): void {
|
public remove_player(player: string, ban: boolean): void {
|
||||||
delete this._players[player];
|
delete this._players[player];
|
||||||
if (ban) {
|
if (ban) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue