Trigger the game start sequence
This commit is contained in:
parent
fd2857d055
commit
9f4023772d
1 changed files with 7 additions and 0 deletions
|
|
@ -34,6 +34,13 @@ export const StartGame = (io: Server, socket: Socket, data: StartGame) => {
|
|||
});
|
||||
return;
|
||||
};
|
||||
|
||||
// Start the game
|
||||
game.start()
|
||||
|
||||
socket.to(game.code).emit(`Starting`, {
|
||||
success: true,
|
||||
});
|
||||
} catch (err) {
|
||||
log.prettyError(err);
|
||||
socket.emit(`Starting`, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue