Fix a minor bug

This commit is contained in:
Anthony Wang 2021-05-08 22:12:38 -05:00
parent e5c942c941
commit cb24f26534
Signed by: a
GPG key ID: 6FD3502572299774

View file

@ -95,6 +95,7 @@ export default class Game {
await this.prepare(); // Phase 0 await this.prepare(); // Phase 0
this.phase = 1; this.phase = 1;
this.lastPlayed = 0; this.lastPlayed = 0;
this.players.forEach((p: Player) => { p.flipped = []; });
while (true) { // Phase 1 while (true) { // Phase 1
const p = this.players[this.playerTurn]; const p = this.players[this.playerTurn];
if (p.rank || p.disconnected) { if (p.rank || p.disconnected) {
@ -129,7 +130,6 @@ export default class Game {
(() => { (() => {
p.stack = stack; p.stack = stack;
p.cards = [...stack]; p.cards = [...stack];
p.flipped = [];
return; return;
})(); })();
resolve(); resolve();