feat: reads potentions from ljc file

This commit is contained in:
2026-03-16 01:24:01 -03:00
parent 30be88e6b4
commit 0763c4a9e1
19 changed files with 250 additions and 210 deletions

View File

@@ -1,12 +1,13 @@
from diceplayer.config.player_config import PlayerConfig
from diceplayer.dice.dice_handler import DiceHandler
from diceplayer.logger import logger
from diceplayer.optimization.optimization_handler import OptimizationHandler
from diceplayer.state.state_handler import StateHandler
from diceplayer.state.state_model import StateModel
from typing_extensions import TypedDict, Unpack
from diceplayer.utils.potential import read_system_from_phb
class PlayerFlags(TypedDict):
continuation: bool
@@ -30,9 +31,11 @@ class Player:
self._state_handler.delete()
state = None
if state is None:
state = StateModel.from_config(self.config)
system = read_system_from_phb(self.config)
state = StateModel(
config=self.config, system=system
)
else:
logger.info("Resuming from existing state.")