diff --git a/server/src/objects/Game.ts b/server/src/objects/Game.ts index 4516a7d..64a1d21 100644 --- a/server/src/objects/Game.ts +++ b/server/src/objects/Game.ts @@ -7,6 +7,8 @@ import { createReadStream } from "fs"; export class Game { readonly id: string; + readonly host: Player; + public ingame: boolean; public teams: [Team, Team]; public players: Player[]; private _questions: Deck; @@ -15,8 +17,10 @@ export class Game { public object: string; - constructor(conf: config) { + constructor(conf: config, host: Player) { this.id = Game.generateID(conf.game.code_length); + this.host = host; + this.ingame = false; // Get the decks based on what type of data they are. switch (conf.game.cards.type) { @@ -34,7 +38,6 @@ export class Game { this.teams[1].addQuestions(this._questions.draw(conf.game.hand_size)); }; - get questions() { return this._questions; }; get objects() {