From 80ed5f908e33d5697d4cbe6d07df4db3801050bd Mon Sep 17 00:00:00 2001 From: Nicolas Fritz Date: Sun, 29 Jan 2023 15:23:51 +0100 Subject: [PATCH] Debug aktualisiert zu GameStats --- uno/css/uno.css | 4 +++- uno/index.html | 1 - uno/web/Style.js | 22 +++++----------------- 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/uno/css/uno.css b/uno/css/uno.css index 2d813ac..0d5eb9e 100644 --- a/uno/css/uno.css +++ b/uno/css/uno.css @@ -2,6 +2,8 @@ *{ font-family: 'Cabin', sans-serif; + font-size: large; + color: white; } body @@ -135,4 +137,4 @@ body #cc-green:hover{ top: calc(20vw + 15px); right: calc(50vw + 15px); -} \ No newline at end of file +} diff --git a/uno/index.html b/uno/index.html index 3bc5b50..13a756a 100644 --- a/uno/index.html +++ b/uno/index.html @@ -25,7 +25,6 @@

-
diff --git a/uno/web/Style.js b/uno/web/Style.js index 711c2db..41e8b8a 100644 --- a/uno/web/Style.js +++ b/uno/web/Style.js @@ -72,8 +72,6 @@ export default class Style { }); - - this.startUnoLoop(); } refreshHtml() { @@ -98,24 +96,14 @@ export default class Style { refreshDebug() { $('#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' + 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:
"); + 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 + "
"); } - $('#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); - if (!this.game.currentPlayerInstanz.canPlay) $('#drawCard').css('background-color', 'red'); } showUnoButton(){