fix 36/52 game change

fix game changer button disabled when refresh page
This commit is contained in:
jahlib
2025-11-05 12:13:32 +03:00
committed by GitHub
parent 9942c0415e
commit ba43382b03
+5 -1
View File
@@ -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) {