aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2021-05-09 13:17:24 -0500
committerAnthony Wang2021-05-09 13:17:24 -0500
commit02964186a8886380fe95e1e8d328213534d4ad36 (patch)
treeae37f5eb10345d842436b99f96df5dc854382aba
parente1d06740a9a6e6e0b08e1d52f19f259d74793751 (diff)
Fix a minor bug
-rw-r--r--back/src/Game.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/back/src/Game.ts b/back/src/Game.ts
index d056210..e7e69ac 100644
--- a/back/src/Game.ts
+++ b/back/src/Game.ts
@@ -92,10 +92,11 @@ export default class Game {
}
async round() {
this.phase = 0;
+ 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;
- this.players.forEach((p: Player) => { p.flipped = []; });
while (true) { // Phase 1
const p = this.players[this.playerTurn];
if (p.rank || p.disconnected) {