0
0
Fork 0

Merge pull request #62 from Oliver-Akins/dev

v1.2.4
This commit is contained in:
Oliver 2021-01-23 12:45:05 -07:00 committed by GitHub
commit 7d2f43a37b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 5 deletions

View file

@ -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;

View file

@ -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

View file

@ -1,9 +1,6 @@
<template>
<div id="PlayerHand">
<div class="flex-center" v-if="mostRecentQuestion">
{{ mostRecentQuestion }}
</div>
<div class="flex-center" v-else-if="gameOver">
<div class="flex-center" v-if="gameOver">
<a
v-if="$store.state.survey_link"
:href="$store.state.survey_link"
@ -21,6 +18,9 @@
Go to Lobby
</button>
</div>
<div class="flex-center" v-else-if="mostRecentQuestion">
{{ mostRecentQuestion }}
</div>
<div class="hand" v-else>
<div
class="card"