diff --git a/poker.db b/poker.db index 895f320..31a3e37 100644 Binary files a/poker.db and b/poker.db differ diff --git a/public/main.js b/public/main.js index 79a2989..465e4fe 100644 --- a/public/main.js +++ b/public/main.js @@ -194,6 +194,9 @@ function startSinglePlayer() { // Сохраняем имя localStorage.setItem('playerName', playerName); + // Очищаем чат перед началом новой игры + clearGameChat(); + // Создаём игру game = new PokerGame({ smallBlind: 5, @@ -1502,6 +1505,16 @@ function toggleChat() { document.getElementById('game-chat').classList.toggle('expanded'); } +/** + * Очистить игровой чат + */ +function clearGameChat() { + const container = document.getElementById('game-chat-messages'); + if (container) { + container.innerHTML = ''; + } +} + // ============================================================================= // НАСТРОЙКИ // ============================================================================= @@ -1966,6 +1979,7 @@ function leaveGame() { leaveRoom(); } game = null; + clearGameChat(); // Очищаем чат при выходе из игры showScreen('main-menu'); } }