Add toString override for debugging purposes.

This commit is contained in:
Oliver-Akins 2020-09-29 17:07:28 -06:00
parent 661f52292e
commit b0117ed6fe

View file

@ -19,4 +19,13 @@ class Game {
host: is_host host: is_host
}; };
}; };
}
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(',')})`;
};
};