diff --git a/back/src/Game.ts b/back/src/Game.ts index 6e0fb43..2bde1b0 100644 --- a/back/src/Game.ts +++ b/back/src/Game.ts @@ -79,7 +79,8 @@ export default class Game { [remainingCards[i], remainingCards[j]] = [remainingCards[j], remainingCards[i]]; } for (let i = 0; i < this.room.clients.length; ++i) - this.players[i].cards = remainingCards.slice(i*(handSize-2), (i+1)*(handSize-2)); + for (let j = 0; j < handSize-2; ++j) + this.players[i].cards.push(remainingCards[i*(handSize-2)+j]); const startingPlayer = this.players[0]; // Pick a random starting player instead?? this.playerTurn = this.players.indexOf(startingPlayer); this.playersFinished = this.room.clients.length;