From 9003983fdd52aeb6a3fcad7f1eea1d0cce8d9532 Mon Sep 17 00:00:00 2001 From: Nicolas Fritz Date: Fri, 27 Jan 2023 12:07:09 +0100 Subject: [PATCH] bugfix sayUno() --- uno/web/Player.js | 7 ++++++- uno/web/uno.js | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/uno/web/Player.js b/uno/web/Player.js index 6188471..fbf402f 100644 --- a/uno/web/Player.js +++ b/uno/web/Player.js @@ -18,10 +18,15 @@ export default class Player { //Lässt den Spieler eine Anzahl "amount" an Karten ziehen drawCard(amount, nextTurn, anim) { if(this.game.stack !== 0){ + if (!this.game.currentPlayerInstanz.mustSayUno){ let cards = this.game.stack; this.game.stack = 0; - this.drawCard(cards, true, true); + if (this.game.cardOnDeck.name === '+4') + this.drawCard(cards, true, true); + else + this.drawCard(cards, false, true); return; + } } //Ziehe so viele Karten, wie amount übergeben wurde diff --git a/uno/web/uno.js b/uno/web/uno.js index c422af6..cb627f5 100644 --- a/uno/web/uno.js +++ b/uno/web/uno.js @@ -4,9 +4,9 @@ import Game from "./Game.js"; export const CARD_COLORS = ["NONE", "BLUE", "GREEN", "RED", "YELLOW"]; let rules = { - startCards: 8, + startCards: 3, firstPlaySpecial: true, - stackCards: false, + stackCards: true, } $(()=>{