0
0
Fork 0

Add the user to the guessers list when randomizing

This commit is contained in:
Oliver-Akins 2021-03-15 19:14:07 -06:00
parent 66891667b9
commit 9f6766bd78

View file

@ -44,6 +44,9 @@ export default (io: Server, socket: Socket, data: RandomizeTeams) => {
player.role = `guesser`; player.role = `guesser`;
player.team = new_team; player.team = new_team;
// Update the team object
game.teams[new_team - 1].guessers.push(player);
// Add the next player to the other team // Add the next player to the other team
new_team = new_team == 1 ? 2 : 1; new_team = new_team == 1 ? 2 : 1;