From 1db55a6208f4c708dfaa639ffce527baa10b98be Mon Sep 17 00:00:00 2001 From: Nicolas Fritz Date: Fri, 27 Jan 2023 01:24:29 +0100 Subject: [PATCH] fixed Karte ziehen --- uno/node/js/cards/special/PlusAmount.js | 2 +- uno/web/Game.js | 4 +--- uno/web/Style.js | 2 +- uno/web/cards/special/PlusAmount.js | 2 +- uno/web/cards/special/Skip.js | 5 +++-- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/uno/node/js/cards/special/PlusAmount.js b/uno/node/js/cards/special/PlusAmount.js index c55b386..e13455e 100644 --- a/uno/node/js/cards/special/PlusAmount.js +++ b/uno/node/js/cards/special/PlusAmount.js @@ -22,7 +22,7 @@ class PlusAmount extends Card { //Todo: Karten Stapeln Regel //lässt den nächsten Spieler den PlusAmount der Karte ziehen - this.game.players[this.game.nextPlayer()].drawCard(this._plus, false, true); + this.game.players[this.game.nextPlayer()].drawCard(this._plus, false, false); if(this._plus === 4){ diff --git a/uno/web/Game.js b/uno/web/Game.js index c09eab5..d598424 100644 --- a/uno/web/Game.js +++ b/uno/web/Game.js @@ -160,7 +160,7 @@ export default class Game { this.players[this.currentPlayer].turn = false; } - + setTimeout(()=>{ //nächster Spieler wird gesetzt @@ -172,8 +172,6 @@ export default class Game { this.refreshCanPutCard(); //HTML - - setTimeout(()=>{ this.style.refreshHtml(); }, delay) diff --git a/uno/web/Style.js b/uno/web/Style.js index e0cc675..3591876 100644 --- a/uno/web/Style.js +++ b/uno/web/Style.js @@ -28,7 +28,7 @@ export default class Style { let playerInstanz = this.game.currentPlayerInstanz; - this.drawCardAnim(false, false); + this.drawCardAnim(false, true); playerInstanz.drawCard(1, true, true); diff --git a/uno/web/cards/special/PlusAmount.js b/uno/web/cards/special/PlusAmount.js index be24372..382305c 100644 --- a/uno/web/cards/special/PlusAmount.js +++ b/uno/web/cards/special/PlusAmount.js @@ -21,7 +21,7 @@ export default class PlusAmount extends Card { //Todo: Karten Stapeln Regel //lässt den nächsten Spieler den PlusAmount der Karte ziehen - this.game.players[this.game.nextPlayer()].drawCard(this.plus, false, true); + this.game.players[this.game.nextPlayer()].drawCard(this.plus, false, false); if(this.plus === 4){ diff --git a/uno/web/cards/special/Skip.js b/uno/web/cards/special/Skip.js index baa1202..4ffa43b 100644 --- a/uno/web/cards/special/Skip.js +++ b/uno/web/cards/special/Skip.js @@ -14,12 +14,13 @@ export default class Skip extends Card { //Führt Logik der Karte aus (den nächsten Spieler überspringen) putSelf() { + //Logik von Card.js ausführen + super.putSelf(); //Der nächste Spieler wird auf currentPlayer gesetzt -> Überspringt diesen Spieler, weil beim nächsten Zug wieder nächster SPieler this.game.currentPlayer = this.game.nextPlayer(); - //Logik von Card.js ausführen - super.putSelf(); + } } \ No newline at end of file