Condense the game object creation

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

View file

@ -28,10 +28,9 @@ export const HostGame = (socket: Socket, data: HostGame) => {
// Add the user to the game's room
socket.join(game_code);
// Create the game
let game = new Game(game_code, data.username)
active_games[game_code] = game;
log.info(`${data.username} created a game. (Gamecode: ${game_code})`);
// Respond to client