commit
7d2f43a37b
3 changed files with 14 additions and 5 deletions
|
|
@ -13,8 +13,9 @@ export default (io: Server, socket: Socket, data: ResetGame) => {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
let game = games[data.game_code];
|
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.questions.reset();
|
||||||
game.resetObject();
|
game.resetObject();
|
||||||
game.ingame = false;
|
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) {
|
public removeCard(question: string) {
|
||||||
/**
|
/**
|
||||||
* Removes the given question from the medium's hand
|
* Removes the given question from the medium's hand
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div id="PlayerHand">
|
<div id="PlayerHand">
|
||||||
<div class="flex-center" v-if="mostRecentQuestion">
|
<div class="flex-center" v-if="gameOver">
|
||||||
{{ mostRecentQuestion }}
|
|
||||||
</div>
|
|
||||||
<div class="flex-center" v-else-if="gameOver">
|
|
||||||
<a
|
<a
|
||||||
v-if="$store.state.survey_link"
|
v-if="$store.state.survey_link"
|
||||||
:href="$store.state.survey_link"
|
:href="$store.state.survey_link"
|
||||||
|
|
@ -21,6 +18,9 @@
|
||||||
Go to Lobby
|
Go to Lobby
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flex-center" v-else-if="mostRecentQuestion">
|
||||||
|
{{ mostRecentQuestion }}
|
||||||
|
</div>
|
||||||
<div class="hand" v-else>
|
<div class="hand" v-else>
|
||||||
<div
|
<div
|
||||||
class="card"
|
class="card"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue