feat: reads potentions from ljc file
This commit is contained in:
@@ -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.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user