Adjust string output
This commit is contained in:
parent
bdb7f6fc14
commit
30ee2febcb
1 changed files with 2 additions and 6 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue