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

Method add_card

BlackJack_game/blackjack_rr.py:86–90  ·  view source on GitHub ↗
(self, card)

Source from the content-addressed store, hash-verified

84 self.aces = 0 # to keep track of aces
85
86 def add_card(self, card):
87 self.cards.append(card)
88 self.value += values[card.rank]
89 if card.rank == "Ace":
90 self.aces += 1
91
92 def adjust_for_ace(self):
93 while self.value > 21 and self.aces:

Callers 2

hitFunction · 0.45
blackjack_rr.pyFile · 0.45

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected