11 lines
349 B
Python
11 lines
349 B
Python
from collections import deque
|
|
|
|
from .. import Card
|
|
|
|
class CardCollection(deque):
|
|
def __init__(self, iterable, maxlen=None):
|
|
if not len(iterable) == 0 or all([isinstance(Card, item) for item in iterable]):
|
|
raise TypeError("CardCollections must only contain Cards")
|
|
else:
|
|
super().__init__(iterable, maxlen)
|