|
@ -72,8 +72,6 @@ export default class Style { |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.startUnoLoop(); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
refreshHtml() { |
|
|
refreshHtml() { |
|
@ -98,24 +96,14 @@ export default class Style { |
|
|
refreshDebug() { |
|
|
refreshDebug() { |
|
|
$('#drawCard').css('background-color', 'white'); |
|
|
$('#drawCard').css('background-color', 'white'); |
|
|
|
|
|
|
|
|
$("#player").html("Spieler: " + this.game.currentPlayerInstanz.name); |
|
|
|
|
|
$("#playerCards").html("Karten: "); |
|
|
|
|
|
for (let i = 0; i < this.game.currentPlayerInstanz.hand.length; i++) { |
|
|
|
|
|
$('#playerCards').append(this.game.currentPlayerInstanz.hand[i].name + " - " + this.game.currentPlayerInstanz.hand[i].color); |
|
|
|
|
|
$('#playerCards').append('<button id="button' + i + '">+</button> | '); |
|
|
|
|
|
$('#button' + i).on('click', () => { |
|
|
|
|
|
this.game.currentPlayerInstanz.putCard(i); |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
this.showPlayerDeck(this.game.currentPlayerInstanz, false, true, false); |
|
|
|
|
|
}, 100); |
|
|
|
|
|
}); |
|
|
|
|
|
if (this.game.currentPlayerInstanz.hand[i].canPut) $('#button' + i).css('background-color', 'green'); |
|
|
|
|
|
|
|
|
$("#player").html("Aktueller Spieler: " + this.game.currentPlayerInstanz.name + " | " + this.game.currentPlayerInstanz.hand.length); |
|
|
|
|
|
$("#playerCards").html("Weitere Spieler: <br>"); |
|
|
|
|
|
for (let i = 0; i < this.game.players.length; i++) { |
|
|
|
|
|
if(this.game.players[i] === this.game.currentPlayerInstanz) continue; |
|
|
|
|
|
$('#playerCards').append("" + this.game.players[i].name + " | " + this.game.players[i].hand.length + "<br>"); |
|
|
} |
|
|
} |
|
|
$('#playerCards').append("" + this.game.currentPlayerInstanz.hand.length) |
|
|
|
|
|
$("#cardOnDeck").html("Karte auf dem Tisch: " + this.game.cardOnDeck.name + " - " + this.game.cardOnDeck.color); |
|
|
|
|
|
$("#playerInGame").html("Spieler im Spiel: " + this.game.players.length); |
|
|
$("#playerInGame").html("Spieler im Spiel: " + this.game.players.length); |
|
|
|
|
|
|
|
|
if (!this.game.currentPlayerInstanz.canPlay) $('#drawCard').css('background-color', 'red'); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
showUnoButton(){ |
|
|
showUnoButton(){ |
|
|