mirror of
https://github.com/DavidGailleton/42-Piscine_Python.git
synced 2026-03-14 05:06:55 +01:00
module 7 ex3 WIP
This commit is contained in:
23
07/ex3/CardFactory.py
Normal file
23
07/ex3/CardFactory.py
Normal file
@@ -0,0 +1,23 @@
|
||||
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: ...
|
||||
Reference in New Issue
Block a user