Skip to content

Commit

Permalink
Add missing self variables to Deck of Cards solution (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored and donnemartin committed Mar 18, 2018
1 parent 0178943 commit b156e48
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def add_card(self, card):

def score(self):
total_value = 0
for card in card:
for card in self.cards:
total_value += card.value
return total_value

Expand Down Expand Up @@ -102,9 +102,9 @@ def __init__(self, cards):
self.deal_index = 0

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:
card = self.cards[self.deal_index]
card.is_available = False
Expand Down

0 comments on commit b156e48

Please sign in to comment.