kinda works now

This commit is contained in:
Jannes Höke
2016-02-29 01:53:59 +01:00
parent 29a6ac8b07
commit 5465fca34f
8 changed files with 119 additions and 17 deletions

View File

@ -24,11 +24,14 @@ class Deck(object):
self.shuffle()
def shuffle(self):
self.cards = shuffle(self.cards)
self.logger.debug("Shuffling Deck")
shuffle(self.cards)
def draw(self):
try:
return self.cards.pop()
card = self.cards.pop()
self.logger.debug("Drawing card " + str(card))
return card
except IndexError:
while len(self.graveyard):
self.cards.append(self.graveyard.pop())