refactor: restructure dice environment handling and update Python version requirement
This commit is contained in:
@@ -1,19 +1,28 @@
|
||||
from pathlib import Path
|
||||
|
||||
from diceplayer.config.player_config import RoutineType
|
||||
from diceplayer.dice.dice_wrapper import DiceEnvironment
|
||||
from diceplayer.dice.dice_wrapper import DiceEnvironmentItem
|
||||
from diceplayer.environment import Atom
|
||||
from diceplayer.logger import logger
|
||||
from diceplayer.state.state_model import StateModel
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
class OptimizationHandler:
|
||||
def __init__(self, step_directory: Path):
|
||||
self.dice_directory = step_directory / "dice"
|
||||
self.optimization_directory = step_directory / "optimization"
|
||||
|
||||
def run(self, state: StateModel, current_cycle: int, dice_environment: list[DiceEnvironment]) -> StateModel:
|
||||
def run(
|
||||
self,
|
||||
state: StateModel,
|
||||
current_cycle: int,
|
||||
dice_environment: list[Atom],
|
||||
) -> StateModel:
|
||||
routine = self._fetch_current_routine(state, current_cycle)
|
||||
print(f"Running Optimization - {current_cycle} - {routine}")
|
||||
logger.info(
|
||||
f"Running Optimization - {current_cycle} - {routine} - {self.optimization_directory}"
|
||||
)
|
||||
|
||||
print(dice_environment)
|
||||
logger.info(dice_environment)
|
||||
|
||||
return state
|
||||
|
||||
|
||||
Reference in New Issue
Block a user