Add remove_player method.
This commit is contained in:
parent
30ee2febcb
commit
05dc6995e5
1 changed files with 8 additions and 1 deletions
|
|
@ -27,7 +27,14 @@ export class Game {
|
||||||
this.#players[player] = {
|
this.#players[player] = {
|
||||||
position: undefined,
|
position: undefined,
|
||||||
role: undefined,
|
role: undefined,
|
||||||
host: is_host
|
host: is_host,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
public remove_player(player: string, ban: boolean): void {
|
||||||
|
delete this._players[player];
|
||||||
|
if (ban) {
|
||||||
|
this.banned_players.push(player);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue