Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -57,7 +57,11 @@ game_deck, dealer, player, game_play = start_game()
|
|
57 |
|
58 |
def display_pro_tip(player, dealer):
|
59 |
player_total = sum(card.rank for card in player.cards)
|
60 |
-
|
|
|
|
|
|
|
|
|
61 |
|
62 |
if player_total <= 11:
|
63 |
return "Pro Tip: With a total of 11 or less, it's generally advisable to hit."
|
@@ -70,7 +74,11 @@ def display_pro_tip(player, dealer):
|
|
70 |
|
71 |
def display_betting_strategy(player, dealer):
|
72 |
player_total = sum(card.rank for card in player.cards)
|
73 |
-
|
|
|
|
|
|
|
|
|
74 |
|
75 |
if player_total <= 11:
|
76 |
return "Betting Strategy: Consider increasing your bet when your total is 11 or less."
|
|
|
57 |
|
58 |
def display_pro_tip(player, dealer):
|
59 |
player_total = sum(card.rank for card in player.cards)
|
60 |
+
|
61 |
+
if dealer.cards:
|
62 |
+
dealer_upcard = dealer.cards[0].rank
|
63 |
+
else:
|
64 |
+
dealer_upcard = 0
|
65 |
|
66 |
if player_total <= 11:
|
67 |
return "Pro Tip: With a total of 11 or less, it's generally advisable to hit."
|
|
|
74 |
|
75 |
def display_betting_strategy(player, dealer):
|
76 |
player_total = sum(card.rank for card in player.cards)
|
77 |
+
|
78 |
+
if dealer.cards:
|
79 |
+
dealer_upcard = dealer.cards[0].rank
|
80 |
+
else:
|
81 |
+
dealer_upcard = 0
|
82 |
|
83 |
if player_total <= 11:
|
84 |
return "Betting Strategy: Consider increasing your bet when your total is 11 or less."
|