Browse Source

bugfix sayUno()

main
Nicolas Fritz 2 years ago
parent
commit
9003983fdd
  1. 5
      uno/web/Player.js
  2. 4
      uno/web/uno.js

5
uno/web/Player.js

@ -18,11 +18,16 @@ 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;
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
for (let i = 0; i < amount; i++) {

4
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,
}
$(()=>{

Loading…
Cancel
Save