Read Potentials and Initial Testing

This commit is contained in:
2023-03-04 16:20:25 -03:00
parent 7a87204181
commit 71744641ff
35 changed files with 793 additions and 2836 deletions

View File

@@ -0,0 +1,26 @@
from diceplayer.shared.utils.dataclass_protocol import Dataclass
from abc import ABC, abstractmethod
class External(ABC):
__slots__ = [
'config'
]
@abstractmethod
def __init__(self, data: dict):
pass
@staticmethod
@abstractmethod
def set_config(data: dict) -> Dataclass:
pass
@abstractmethod
def start(self):
pass
@abstractmethod
def reset(self):
pass

View File

22
diceplayer/shared/external/dice.py vendored Normal file
View File

@@ -0,0 +1,22 @@
from diceplayer.shared.utils.dataclass_protocol import Dataclass
from diceplayer.shared.external.__external import External
from diceplayer.shared.config.dice_dto import DiceDTO
class Dice(External):
def __init__(self, data: dict):
self.config: DiceDTO = self.set_config(data)
@staticmethod
def set_config(data: dict) -> DiceDTO:
return DiceDTO.from_dict(data)
def configure(self):
pass
def start(self):
pass
def reset(self):
pass

23
diceplayer/shared/external/gaussian.py vendored Normal file
View File

@@ -0,0 +1,23 @@
from diceplayer.shared.utils.dataclass_protocol import Dataclass
from diceplayer.shared.config.gaussian_dto import GaussianDTO
from diceplayer.shared.external.__external import External
class Gaussian(External):
def __init__(self, data: dict):
self.config: GaussianDTO = self.set_config(data)
@staticmethod
def set_config(data: dict) -> GaussianDTO:
return GaussianDTO.from_dict(data)
def configure(self):
pass
def start(self):
pass
def reset(self):
pass