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 {