19 lines
618 B
Python
19 lines
618 B
Python
from diceplayer.config.player_config import RoutineType
|
|
from diceplayer.state.state_model import StateModel
|
|
|
|
|
|
class OptimizationHandler:
|
|
@staticmethod
|
|
def run(state: StateModel, current_cycle: int) -> StateModel:
|
|
print(f"Running Optimization - {current_cycle}")
|
|
return state
|
|
|
|
@staticmethod
|
|
def _fetch_current_routine(state: StateModel, current_cycle: int) -> RoutineType:
|
|
if state.config.type != RoutineType.BOTH:
|
|
return state.config.type
|
|
|
|
if current_cycle < state.config.switch_cyc:
|
|
return RoutineType.CHARGE
|
|
|
|
return RoutineType.GEOMETRY |