0
0
Fork 0

Adjust method call for the team hand updating

This commit is contained in:
Oliver-Akins 2020-12-27 15:07:39 -07:00
parent 1a810185ca
commit 19f02c60b2
2 changed files with 3 additions and 3 deletions

View file

@ -27,7 +27,7 @@ export default (io: Server, socket: Socket, data: NewHand) => {
}; };
// Add the questions and then alert the game clients about the changes // 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}.`); log.silly(`[${game.id}] Drew a new hand of cards for team ${data.team}.`);
io.to(game.id).emit(`UpdateHand`, { io.to(game.id).emit(`UpdateHand`, {
mode: `replace`, mode: `replace`,

View file

@ -22,14 +22,14 @@ export class Team {
get questions(): string[] { return this._questions; }; 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 * Adds the question(s) to the medium's hand
* *
* @param questions -> The array of question text to add the medium's * @param questions -> The array of question text to add the medium's
* hand. * hand.
*/ */
this._questions.push(...questions); this._hand.push(...questions);
}; };