Join the player to the game room.
This commit is contained in:
parent
e2e62859b7
commit
fac5dd0c7e
1 changed files with 1 additions and 0 deletions
|
|
@ -60,6 +60,7 @@ export default (io: Server, socket: Socket, data: JoinGame) => {
|
|||
let player = new Player(data.name, socket);
|
||||
game.players.push(player);
|
||||
|
||||
socket.join(game.id);
|
||||
socket.emit(`GameJoined`, {
|
||||
status: 200,
|
||||
players: game.playerData,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue