Add player to the game's socket room

This commit is contained in:
Oliver-Akins 2020-10-08 21:21:59 -06:00
parent f43f36eb46
commit c5e1621366

View file

@ -43,7 +43,8 @@ export const JoinGame = (socket: Socket, data: JoinGame) => {
return;
};
game.add_player(data.username);
// Add to game room
socket.join(game.code);
// Add the player
game.add_player(data.username, socket.id);