From 30ee2febcb7d7e8b088a513fb64439071c4beb01 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Tue, 6 Oct 2020 23:16:53 -0600 Subject: [PATCH] Adjust string output --- src/utils/Game.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/utils/Game.ts b/src/utils/Game.ts index a37f048..aa3ad3f 100644 --- a/src/utils/Game.ts +++ b/src/utils/Game.ts @@ -32,12 +32,8 @@ export class Game { }; public toString(): string { - let players: string[] = []; - 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'}`); - }; - return `Game(code=${this.code},players=${players.join(',')})`; + let player_count = Object.keys(this._players).length; + return `Game(code=${this.code},players=${player_count})`; }; public toJSON(): string {