diff options
-rw-r--r-- | back/src/Game.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/back/src/Game.ts b/back/src/Game.ts index e7e69ac..d054fd7 100644 --- a/back/src/Game.ts +++ b/back/src/Game.ts @@ -60,7 +60,7 @@ export default class Game { const j = Math.floor(Math.random() * (i+1)); [cards[i], cards[j]] = [cards[j], cards[i]]; } - const handSize = 5; // 5 - this.room.clients.length/7; + const handSize = 5 - Math.floor(this.room.clients.length/7); for (let i = 0; i < this.room.clients.length; ++i) { this.players.push(new Player(this, this.room.clients[i])); this.players[i].cards = cards.slice(i * handSize, (i + 1) * handSize); @@ -92,8 +92,8 @@ export default class Game { } async round() { this.phase = 0; - this.players.forEach((p: Player) => { p.stack = []; }); - this.players.forEach((p: Player) => { p.flipped = []; }); + this.players.forEach((p: Player) => p.stack = []); + this.players.forEach((p: Player) => p.flipped = []); await this.prepare(); // Phase 0 this.phase = 1; this.lastPlayed = 0; |