20 lines
439 B
Python
20 lines
439 B
Python
from diceplayer.config import PlayerConfig
|
|
from diceplayer.environment import System
|
|
|
|
from pydantic import BaseModel
|
|
from typing_extensions import Self
|
|
|
|
|
|
class StateModel(BaseModel):
|
|
config: PlayerConfig
|
|
system: System
|
|
current_cycle: int
|
|
|
|
@classmethod
|
|
def from_config(cls, config: PlayerConfig) -> Self:
|
|
return cls(
|
|
config=config,
|
|
system=System(),
|
|
current_cycle=0,
|
|
)
|