This commit is contained in:
Maik 2026-06-13 23:01:43 +02:00
parent 9d8752ab40
commit 97ffb52703
2 changed files with 4 additions and 2 deletions

View File

@ -103,6 +103,7 @@ class BlackjackGUI:
self.next_round_button.configure(state="disabled") self.next_round_button.configure(state="disabled")
self.buttons._enable_action_buttons(True) self.buttons._enable_action_buttons(True)
self.buttons._reset_button_colors() self.buttons._reset_button_colors()
self.buttons.split_button.configure(text="")
if hasattr(self.notifications, 'streak_label') and self.notifications.streak_label: if hasattr(self.notifications, 'streak_label') and self.notifications.streak_label:
self.notifications.streak_label.configure(text="") self.notifications.streak_label.configure(text="")
@ -127,13 +128,13 @@ class BlackjackGUI:
# Handle split possibility # Handle split possibility
can_split_bool = can_split(self.game_logic.player_hand) can_split_bool = can_split(self.game_logic.player_hand)
if can_split_bool: if can_split_bool:
self.buttons.split_button.configure(state="normal") self.buttons.split_button.configure(state="normal", text="Split")
self.feedback_label.configure( self.feedback_label.configure(
text="You have a pair! Consider splitting.", text="You have a pair! Consider splitting.",
text_color="white" text_color="white"
) )
else: else:
self.buttons.split_button.configure(state="disabled") self.buttons.split_button.configure(state="disabled", text="")
# Update notifications # Update notifications
stats = self.game_logic.get_stats() stats = self.game_logic.get_stats()

View File

@ -163,6 +163,7 @@ async function startRound(){
btnNext.disabled=true; btnNext.disabled=true;
enableActions(true); enableActions(true);
resetButtonColors(); resetButtonColors();
btnSplit.textContent=d.can_split?'Split':'';
btnSplit.disabled=!d.can_split; btnSplit.disabled=!d.can_split;
if(d.has_blackjack){ if(d.has_blackjack){
feedback.textContent='Blackjack! You win or get a push!'; feedback.textContent='Blackjack! You win or get a push!';