beginning implementations of CardCollection and some of its subclasses
This commit is contained in:
9
BearOnline/cards/collections/_playingcarddeck.py
Normal file
9
BearOnline/cards/collections/_playingcarddeck.py
Normal 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()))))
|
||||
|
||||
Reference in New Issue
Block a user