Add users to game room when they create a game.

This commit is contained in:
Oliver-Akins 2020-10-08 11:14:32 -06:00
parent d49b214762
commit e3d9bc7e13

View file

@ -25,6 +25,9 @@ export const HostGame = (socket: Socket, data: HostGame) => {
game_code = generate_game_code();
}
// Add the user to the game's room
socket.join(game_code);
let game = new Game(game_code, data.username)
active_games[game_code] = game;