diff --git a/src/utils/Game.ts b/src/utils/Game.ts index 3a00a41..a37f048 100644 --- a/src/utils/Game.ts +++ b/src/utils/Game.ts @@ -14,6 +14,15 @@ export class Game { return this.#players; }; + get host(): string|null { + for (var player in this._players) { + if (this._players[player].host) { + return player; + }; + }; + return null; + } + public add_player(player: string, is_host:boolean=false): void { this.#players[player] = { position: undefined,