diff --git a/src/utils/Game.ts b/src/utils/Game.ts new file mode 100644 index 0000000..792ef7f --- /dev/null +++ b/src/utils/Game.ts @@ -0,0 +1,22 @@ +class Game { + readonly code: string; + #_players: players; + + public constructor(code: string, host: string) { + this.code = code; + this.#_players = {}; + this.add_player(host, true); + }; + + get players(): players { + return this.#_players; + }; + + public add_player(player: string, is_host:boolean=false): void { + this.#_players[player] = { + position: undefined, + role: undefined, + host: is_host + }; + }; +} \ No newline at end of file