Files
42-Piscine_Python/07/ex3/CardFactory.py
2026-03-02 18:32:31 +01:00

24 lines
565 B
Python

from abc import ABC, abstractmethod
from ex0 import Card
class CardFactory(ABC):
@abstractmethod
def create_creature(
self, name_or_power: str | int | None = None
) -> Card: ...
@abstractmethod
def create_spell(self, name_or_power: str | int | None = None) -> Card: ...
@abstractmethod
def create_artifact(
self, name_or_power: str | int | None = None
) -> Card: ...
@abstractmethod
def create_themed_deck(self, size: int) -> dict: ...
@abstractmethod
def get_supported_types(self) -> dict: ...