mirror of
https://github.com/DavidGailleton/42-Piscine_Python.git
synced 2026-03-14 05:06:55 +01:00
01/01 WIP
This commit is contained in:
@@ -1,6 +1,25 @@
|
|||||||
from ex0.Card import Card
|
from ex0.Card import Card
|
||||||
|
|
||||||
|
|
||||||
class Deck():
|
class Deck:
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self:
|
self.cards: list[Card] = []
|
||||||
|
|
||||||
|
def add_card(self, card: Card) -> None:
|
||||||
|
self.cards += [card]
|
||||||
|
|
||||||
|
def remove_card(self, card_name: Card) -> None:
|
||||||
|
for n in range(len(self.cards)):
|
||||||
|
if self.cards[n].name == card_name:
|
||||||
|
self.cards.pop(n)
|
||||||
|
return
|
||||||
|
print("{card_name} not found")
|
||||||
|
|
||||||
|
def shuffle(self) -> None:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def draw_card(self) -> Card:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_deck_stats(self) -> dict:
|
||||||
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user