Log that the game is being reset and mark game as in lobby
This commit is contained in:
parent
e0f76432bf
commit
9a398e41a8
1 changed files with 2 additions and 0 deletions
|
|
@ -13,9 +13,11 @@ 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.questions.reset();
|
game.questions.reset();
|
||||||
game.resetObject();
|
game.resetObject();
|
||||||
|
game.ingame = false;
|
||||||
|
|
||||||
io.to(game.id).emit(`GameReset`, { status: 200 });
|
io.to(game.id).emit(`GameReset`, { status: 200 });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue