Fix ready button state after game over

- Enable ready button in resetLobbyState() so players can ready up
- Remove redundant ready button state reset from endGame()
- Ensure ready button is enabled when returning to lobby

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-21 04:30:09 +00:00
parent 4d28189205
commit 7d385806df
2 changed files with 2 additions and 5 deletions
+2 -1
View File
@@ -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 = '';