MCPcopy Index your code
hub / github.com/geekcomputers/Python / hit

Function hit

blackJackGUI.py:149–159  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

147
148
149def hit():
150 global outcome, in_play, score1, score2, player_card, dealer_card, deck
151 if in_play == True:
152 player_card.add_card(deck.deal_card())
153
154 if player_card.get_value() > 21:
155 outcome = "you are busted"
156 in_play = False
157
158 score1 = str(player_card.get_value())
159 score2 = str(dealer_card.get_value())
160
161
162def draw(canvas):

Callers

nothing calls this directly

Calls 3

get_valueMethod · 0.80
add_cardMethod · 0.45
deal_cardMethod · 0.45

Tested by

no test coverage detected