Adjust string output

This commit is contained in:
Oliver-Akins 2020-10-06 23:16:53 -06:00
parent bdb7f6fc14
commit 30ee2febcb

View file

@ -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 {