🐛
This commit is contained in:
@ -36,7 +36,8 @@ class Blackjack():
|
||||
# Calculates the value of a blackjack hand
|
||||
def calcHandValue(self, hand : list):
|
||||
logThis("Calculating hand value")
|
||||
values = [0]
|
||||
values = []
|
||||
values.append(0)
|
||||
|
||||
for card in hand:
|
||||
cardValue = card[0]
|
||||
@ -47,8 +48,9 @@ class Blackjack():
|
||||
values.append(values[x] + 11)
|
||||
values[x] += 1
|
||||
else:
|
||||
for value in values:
|
||||
value += int(cardValue)
|
||||
for x in range(len(values)):
|
||||
values[x] += int(cardValue)
|
||||
print(values[x])
|
||||
|
||||
values.sort()
|
||||
|
||||
|
Reference in New Issue
Block a user