Condense the game object creation
This commit is contained in:
parent
e3d9bc7e13
commit
efa7540404
1 changed files with 1 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue