From 56ee309b6b70accc85da97ecb1274228c7bd2e2a Mon Sep 17 00:00:00 2001 From: Nicolas Fritz Date: Fri, 27 Jan 2023 11:54:27 +0100 Subject: [PATCH] drawCard() aktualisiert --- uno/web/Player.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/uno/web/Player.js b/uno/web/Player.js index 8934e01..6188471 100644 --- a/uno/web/Player.js +++ b/uno/web/Player.js @@ -17,7 +17,12 @@ export default class Player { //Lässt den Spieler eine Anzahl "amount" an Karten ziehen drawCard(amount, nextTurn, anim) { - + if(this.game.stack !== 0){ + let cards = this.game.stack; + this.game.stack = 0; + this.drawCard(cards, true, true); + return; + } //Ziehe so viele Karten, wie amount übergeben wurde for (let i = 0; i < amount; i++) {