0
0
Fork 0

Only send new hand response to the guessers on the correct team.

This commit is contained in:
Oliver-Akins 2021-01-12 14:45:44 -07:00
parent 9ae1568bea
commit c171d93963

View file

@ -36,7 +36,7 @@ export default (io: Server, socket: Socket, data: NewHand) => {
// Add the questions and then alert the game clients about the changes
team.addCardsToHand(deck.draw(handSize));
game.log.silly(`Drew a new hand of cards for team ${data.team}.`);
io.to(game.id).emit(`UpdateHand`, {
io.to(`${game.id}:${team.id}:guesser`).emit(`UpdateHand`, {
status: 200,
mode: `replace`,
questions: team.hand,