Files
Bear-Online/BearOnline/cards/collections/_playingcarddeck.py

10 lines
336 B
Python

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()))))