Add player to the game's socket room
This commit is contained in:
parent
f43f36eb46
commit
c5e1621366
1 changed files with 2 additions and 1 deletions
|
|
@ -43,7 +43,8 @@ export const JoinGame = (socket: Socket, data: JoinGame) => {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
game.add_player(data.username);
|
// Add to game room
|
||||||
|
socket.join(game.code);
|
||||||
|
|
||||||
// Add the player
|
// Add the player
|
||||||
game.add_player(data.username, socket.id);
|
game.add_player(data.username, socket.id);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue