beginning implementations of CardCollection and some of its subclasses

This commit is contained in:
2020-03-17 22:43:03 -04:00
parent 2e676e4708
commit c1120bcd93
7 changed files with 57 additions and 1 deletions

View File

@@ -0,0 +1,9 @@
from itertools import product, starmap
from ._deck import Deck
from .. import PlayingCard
class PlayingCardDeck(Deck):
def __init__(self):
#initialize the deck with the product of the ranks and suits
super().__init__(list(starmap(PlayingCard, product(PlayingCard.ranks.keys(), PlayingCard.suits.keys()))))