Add the user to the guessers list when randomizing
This commit is contained in:
parent
66891667b9
commit
9f6766bd78
1 changed files with 3 additions and 0 deletions
|
|
@ -44,6 +44,9 @@ export default (io: Server, socket: Socket, data: RandomizeTeams) => {
|
|||
player.role = `guesser`;
|
||||
player.team = new_team;
|
||||
|
||||
// Update the team object
|
||||
game.teams[new_team - 1].guessers.push(player);
|
||||
|
||||
// Add the next player to the other team
|
||||
new_team = new_team == 1 ? 2 : 1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue