From ec66f52c8468b130278177ca5289a9c2041e163f Mon Sep 17 00:00:00 2001 From: Simo Tukiainen Date: Tue, 31 Dec 2024 15:00:27 +0200 Subject: [PATCH] Fix deal button once more --- blackjack_gui/gui.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/blackjack_gui/gui.py b/blackjack_gui/gui.py index ab39bdb..6e1840c 100644 --- a/blackjack_gui/gui.py +++ b/blackjack_gui/gui.py @@ -380,11 +380,13 @@ def _payout(self): and self.dealer.cards[1].visible is False ): self.dealer.is_finished = True - self.gui.root.after(TIME_DELAY, self._reveal_dealer_hidden_card) - self._handle_counts(self.dealer.cards, self.shoe) - self._hide_buttons() - self._show_buttons(("deal",)) - self.gui.slider.configure(state=tkinter.NORMAL) + self.gui.root.after( + TIME_DELAY, self._reveal_dealer_hidden_card, True + ) + else: + self._show_buttons(("deal",)) + self._handle_counts(self.dealer.cards, self.shoe) + self.gui.slider.configure(state=tkinter.NORMAL) def _handle_counts(self, hand: Hand | list[Card], shoe: Shoe): self.player.update_counts(hand, shoe)