Skip to content

Commit

Permalink
Fix deal button once more
Browse files Browse the repository at this point in the history
  • Loading branch information
tukiains committed Dec 31, 2024
1 parent 62b60df commit ec66f52
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions blackjack_gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ec66f52

Please sign in to comment.