deck_of_cards: Do not forget 'self'

Discovered via #93
pull/144/head
cclauss 2018-03-07 06:30:02 +01:00 committed by GitHub
parent f099a0ad3f
commit 6b56e45e9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -68,7 +68,7 @@ class Hand(object):
def score(self): def score(self):
total_value = 0 total_value = 0
for card in card: for card in self.cards:
total_value += card.value total_value += card.value
return total_value return total_value
@ -102,9 +102,9 @@ class Deck(object):
self.deal_index = 0 self.deal_index = 0
def remaining_cards(self): def remaining_cards(self):
return len(self.cards) - deal_index return len(self.cards) - self.deal_index
def deal_card(): def deal_card(self):
try: try:
card = self.cards[self.deal_index] card = self.cards[self.deal_index]
card.is_available = False card.is_available = False