diff --git a/game.js b/game.js index 35c538a..23f5d90 100644 --- a/game.js +++ b/game.js @@ -243,6 +243,13 @@ class Connect5Game { this.currentPlayer = "X"; this.gameActive = true; this.hideVictoryOverlay(); + + // Reset turn label to default + const turnLabel = document.getElementById('turnLabel'); + if (turnLabel) { + turnLabel.textContent = 'Current Turn:'; + } + this.initializeBoard(); } } diff --git a/index.html b/index.html index 93f8aea..5e7fec9 100644 --- a/index.html +++ b/index.html @@ -67,7 +67,7 @@
- Current Turn: + Current Turn:
X
@@ -281,6 +281,12 @@ if (window.multiplayerClient) { window.multiplayerClient.isMultiplayer = false; } + + // Reset turn label to default + const turnLabel = document.getElementById('turnLabel'); + if (turnLabel) { + turnLabel.textContent = 'Current Turn:'; + } } else { localBtn.classList.remove('active'); multiplayerBtn.classList.add('active'); diff --git a/multiplayer.js b/multiplayer.js index 9c9430f..28c69b5 100644 --- a/multiplayer.js +++ b/multiplayer.js @@ -372,8 +372,9 @@ class MultiplayerClient { // Update current player display to show "YOU ARE X/O" const currentPlayerDisplay = document.getElementById('currentPlayer'); + const turnLabel = document.getElementById('turnLabel'); currentPlayerDisplay.textContent = this.mySymbol; - currentPlayerDisplay.parentElement.previousElementSibling.textContent = `You are:`; + turnLabel.textContent = `You are:`; // Update player display colors based on symbol const playerDisplay = document.querySelector('.player-display');