diff --git a/server/src/events/ResetGame.ts b/server/src/events/ResetGame.ts index 388d5a7..a39c0b0 100644 --- a/server/src/events/ResetGame.ts +++ b/server/src/events/ResetGame.ts @@ -13,8 +13,9 @@ export default (io: Server, socket: Socket, data: ResetGame) => { return; }; let game = games[data.game_code]; - game.log.info(`Resetting game`) + game.log.info(`Resetting game`); + game.teams.forEach(t => t.resetHand()); game.questions.reset(); game.resetObject(); game.ingame = false; diff --git a/server/src/objects/Team.ts b/server/src/objects/Team.ts index bf7cb21..668c820 100644 --- a/server/src/objects/Team.ts +++ b/server/src/objects/Team.ts @@ -36,6 +36,14 @@ export class Team { }; + public resetHand(): void { + /** + * Removes all the cards from the guesser's hand + */ + this._hand = []; + } + + public removeCard(question: string) { /** * Removes the given question from the medium's hand diff --git a/web/src/components/Hand.vue b/web/src/components/Hand.vue index 7a31aa8..235153e 100644 --- a/web/src/components/Hand.vue +++ b/web/src/components/Hand.vue @@ -1,9 +1,6 @@