diff --git a/src/utils/Game.ts b/src/utils/Game.ts index 6858d4a..a21d7f0 100644 --- a/src/utils/Game.ts +++ b/src/utils/Game.ts @@ -1,19 +1,19 @@ class Game { readonly code: string; - #_players: players; + #players: players; public constructor(code: string, host: string) { this.code = code; - this.#_players = {}; + this.#players = {}; this.add_player(host, true); }; get players(): players { - return this.#_players; + return this.#players; }; public add_player(player: string, is_host:boolean=false): void { - this.#_players[player] = { + this.#players[player] = { position: undefined, role: undefined, host: is_host @@ -22,7 +22,7 @@ class Game { public toString(): string { let players: string[] = []; - for (var player in this.#_players) { + for (var player in this.#players) { let p: player = this.players[player]; players.push(`${player}(host=${p.host},pos=${p.position || 'none'},role=${p.role || 'none'}`); }; @@ -32,7 +32,7 @@ class Game { public toJSON(): string { return JSON.stringify({ code: this.code, - players: this.#_players, + players: this.#players, }, undefined, `\t`) };