From 728522986a20ffec8eca29cff6454850fadb0450 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Fri, 1 Jan 2021 16:04:19 -0700 Subject: [PATCH] Move card drawing for the teams --- server/src/objects/Game.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/src/objects/Game.ts b/server/src/objects/Game.ts index a0e18c8..9f400f2 100644 --- a/server/src/objects/Game.ts +++ b/server/src/objects/Game.ts @@ -27,16 +27,16 @@ export class Game { switch (conf.game.cards.type) { case "csv": this.parseDeckCSV(conf); + + // Instantiate everything for the teams + this.teams = [ new Team(1), new Team(2) ]; + this.teams[0].addCardsToHand(this._questions.draw(conf.game.hand_size)); + this.teams[1].addCardsToHand(this._questions.draw(conf.game.hand_size)); break; case "sheets": this.parseDeckGoogleSheets(conf); break; }; - - // Instantiate everything for the teams - this.teams = [ new Team(), new Team() ]; - this.teams[0].addQuestions(this._questions.draw(conf.game.hand_size)); - this.teams[1].addQuestions(this._questions.draw(conf.game.hand_size)); }; get questions() { return this._questions; };