Trigger the game start sequence

This commit is contained in:
Oliver-Akins 2020-10-10 01:06:59 -06:00
parent fd2857d055
commit 9f4023772d

View file

@ -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`, {