From 93ceffd1f911341b947cb136387c414398e9bf6b Mon Sep 17 00:00:00 2001 From: jahlib <60108339+jahlib@users.noreply.github.com> Date: Wed, 5 Nov 2025 23:34:58 +0300 Subject: [PATCH] disable winqueen choose suit modal --- client/game.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/client/game.js b/client/game.js index 8f0c30f..af94733 100644 --- a/client/game.js +++ b/client/game.js @@ -1142,10 +1142,21 @@ class CardGame { return; } - // If it's a Queen, show suit selector + // If it's a Queen, check if it's the last card if (card.rank === 'Q') { - this.pendingCardToPlay = card; - this.suitModal.classList.add('active'); + // Если это последняя карта - автоматически выбираем пики + if (this.hand.length === 1) { + // Отправляем карту с автоматическим выбором пик (игрок выигрывает) + this.send({ + type: 'play_card', + card_id: card.id, + chosen_suit: 'spades' + }); + } else { + // Не последняя карта - показываем модалку выбора масти + this.pendingCardToPlay = card; + this.suitModal.classList.add('active'); + } } else { // Отправляем карту без воспроизведения звука // Звук будет воспроизведен когда придет событие card_played