bug fix
This commit is contained in:
parent
9d8752ab40
commit
97ffb52703
@ -103,6 +103,7 @@ class BlackjackGUI:
|
||||
self.next_round_button.configure(state="disabled")
|
||||
self.buttons._enable_action_buttons(True)
|
||||
self.buttons._reset_button_colors()
|
||||
self.buttons.split_button.configure(text="")
|
||||
|
||||
if hasattr(self.notifications, 'streak_label') and self.notifications.streak_label:
|
||||
self.notifications.streak_label.configure(text="")
|
||||
@ -127,13 +128,13 @@ class BlackjackGUI:
|
||||
# Handle split possibility
|
||||
can_split_bool = can_split(self.game_logic.player_hand)
|
||||
if can_split_bool:
|
||||
self.buttons.split_button.configure(state="normal")
|
||||
self.buttons.split_button.configure(state="normal", text="Split")
|
||||
self.feedback_label.configure(
|
||||
text="You have a pair! Consider splitting.",
|
||||
text_color="white"
|
||||
)
|
||||
else:
|
||||
self.buttons.split_button.configure(state="disabled")
|
||||
self.buttons.split_button.configure(state="disabled", text="")
|
||||
|
||||
# Update notifications
|
||||
stats = self.game_logic.get_stats()
|
||||
|
||||
@ -163,6 +163,7 @@ async function startRound(){
|
||||
btnNext.disabled=true;
|
||||
enableActions(true);
|
||||
resetButtonColors();
|
||||
btnSplit.textContent=d.can_split?'Split':'';
|
||||
btnSplit.disabled=!d.can_split;
|
||||
if(d.has_blackjack){
|
||||
feedback.textContent='Blackjack! You win or get a push!';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user