Change header to players color

This commit is contained in:
H4CK3R-01
2021-07-11 18:28:23 +02:00
committed by H4CK3R-01
parent 6c2f8371c1
commit 62c783642f
3 changed files with 33 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ io.on('connection', socket => {
game[socket.room].addPlayerName(data.username);
addedUser = true;
socket.emit('login');
socket.emit('login', game[socket.room].get_player_index(socket.username));
socket.join(socket.room);
io.in(socket.room).emit('updatePlayerNames', game[socket.room].getPlayerNames());