From 19f02c60b21ebb1e821fb00b97af7c7f33fcd6db Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sun, 27 Dec 2020 15:07:39 -0700 Subject: [PATCH] Adjust method call for the team hand updating --- server/src/events/NewHand.ts | 2 +- server/src/objects/Team.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/events/NewHand.ts b/server/src/events/NewHand.ts index d4513d1..78384df 100644 --- a/server/src/events/NewHand.ts +++ b/server/src/events/NewHand.ts @@ -27,7 +27,7 @@ export default (io: Server, socket: Socket, data: NewHand) => { }; // Add the questions and then alert the game clients about the changes - team.addQuestions(deck.draw(conf.game.hand_size)); + team.addCardsToHand(deck.draw(conf.game.hand_size)); log.silly(`[${game.id}] Drew a new hand of cards for team ${data.team}.`); io.to(game.id).emit(`UpdateHand`, { mode: `replace`, diff --git a/server/src/objects/Team.ts b/server/src/objects/Team.ts index d45caea..888b1e5 100644 --- a/server/src/objects/Team.ts +++ b/server/src/objects/Team.ts @@ -22,14 +22,14 @@ export class Team { get questions(): string[] { return this._questions; }; - public addQuestions(questions: string[]): void { + public addCardsToHand(questions: string[]): void { /** * Adds the question(s) to the medium's hand * * @param questions -> The array of question text to add the medium's * hand. */ - this._questions.push(...questions); + this._hand.push(...questions); };