Quote:
|
Originally Posted by coldDeath
EDIT: i've set it to reshuffle when thw number of cards to deal is less than the number of cards left in the pack.
|
Make sure you repopulate the cards; my code removes cards from the pack, just as a dealer would.
Also, you might want to think about representing the cards as objects, rather than strings:
class Card:
def __init__(self, suite, number):
self.suite = suite
self.number = number
def __str__(self):
return "%s of %s" % (self.number, self.suite) This would give you more control over the deck of cards. e.g.:
remaining_hearts = [card for card in self.pack if card.suite = "Hearts"]
Of course, it depends on how complicated you wish to make your program, and what you're going to use it for.