diff --git a/public/js/app.js b/public/js/app.js index 7d5332a..c20644e 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -229,10 +229,6 @@ function endGame(states) { network.isSpectator = false; ui.hideSpectatorMode(); - // Reset ready button state - ui.buttons.ready.textContent = 'READY'; - ui.buttons.ready.disabled = true; - ui.showGameOver(winner, scores); } diff --git a/public/js/ui.js b/public/js/ui.js index 18b4914..b23bbe5 100644 --- a/public/js/ui.js +++ b/public/js/ui.js @@ -81,13 +81,14 @@ class UIManager { handleBackToLobby() { this.hideGameOver(); this.resetLobbyState(); + this.buttons.ready.disabled = false; this.showScreen('room'); } resetLobbyState() { // Reset ready button to default state this.buttons.ready.textContent = 'READY'; - this.buttons.ready.disabled = true; + this.buttons.ready.disabled = false; // Clear player and spectator lists this.displays.playerList.innerHTML = '';