From ba43382b032011f9646c7ee5c960f84bdebd2db0 Mon Sep 17 00:00:00 2001 From: jahlib <60108339+jahlib@users.noreply.github.com> Date: Wed, 5 Nov 2025 12:13:32 +0300 Subject: [PATCH] fix 36/52 game change fix game changer button disabled when refresh page --- client/game.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/game.js b/client/game.js index 88a29ae..495f5c9 100644 --- a/client/game.js +++ b/client/game.js @@ -854,7 +854,11 @@ class CardGame { // Показываем настройки только создателю комнаты и только до начала игры const isCreator = room.creator_id === this.playerId; const gameNotStarted = !room.game_started; - this.roomSettings.style.display = (isCreator && gameNotStarted) ? 'block' : 'none'; + + // Проверяем что ни у кого нет очков (игра ещё не начиналась) + const noScores = room.players.every(p => p.score === 0); + + this.roomSettings.style.display = (isCreator && gameNotStarted && noScores) ? 'block' : 'none'; // Устанавливаем текущий размер колоды if (room.deck_size) {