From d4d01bf3acb04d81b0c8551eba349f0c93180111 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Tue, 6 Oct 2020 23:17:40 -0600 Subject: [PATCH] Change property name. --- src/utils/Game.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/utils/Game.ts b/src/utils/Game.ts index 1355916..e4d53bb 100644 --- a/src/utils/Game.ts +++ b/src/utils/Game.ts @@ -1,17 +1,19 @@ export class Game { readonly code: string; public status: game_states; - #players: players; + private banned_players: string[]; + private _players: players; public constructor(code: string, host: string) { this.code = code; - this.#players = {}; + this._players = {}; this.status = `lobby`; + this.banned_players = []; this.add_player(host, true); }; get players(): players { - return this.#players; + return this._players; }; get host(): string|null { @@ -24,7 +26,7 @@ export class Game { } public add_player(player: string, is_host:boolean=false): void { - this.#players[player] = { + this._players[player] = { position: undefined, role: undefined, host: is_host, @@ -46,7 +48,7 @@ export class Game { public toJSON(): string { return JSON.stringify({ code: this.code, - players: this.#players, + players: this._players, }, undefined, `\t`) };