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

Method get_value

blackJackGUI.py:84–97  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

82 self.hand.append(card)
83
84 def get_value(self):
85 var = []
86 self.hand_value = 0
87 for card in self.hand:
88 card = str(card)
89 if card[1] in VALUES:
90 self.hand_value += VALUES[card[1]]
91 var.append(card[1])
92 if "A" not in var:
93 return self.hand_value
94 if self.hand_value + 10 <= 21:
95 return self.hand_value + 10
96 else:
97 return self.hand_value
98
99 def draw(self, canvas, pos):
100 for card in self.hand:

Callers 3

dealFunction · 0.95
standFunction · 0.80
hitFunction · 0.80

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected