commit
7d2f43a37b
3 changed files with 14 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue