From 383666ffc66926cda9476650b82624ebda1df426 Mon Sep 17 00:00:00 2001 From: Harshil Gupta Date: Mon, 5 Aug 2024 16:45:36 +0530 Subject: [PATCH] Scoreboard update --- js/game.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/game.js b/js/game.js index df72733..0f0ae3d 100644 --- a/js/game.js +++ b/js/game.js @@ -321,10 +321,11 @@ class Game { this.currentPlayerIndex = 0; } - // Update the UI - this.switchPlayer(); + this.currentPlayer = this.players[this.currentPlayerIndex]; + this.addPlayersUI(); this.updatePlayerNameUI(); + this.updatePlayerScoreUI(); if (this.players.length == 1) { this.invokeEvent("playerWin");