from .battle_agent_choose import BattleAgentChooseSolver
from .choose_squad import ChooseSquadSolver
from .choose_support import ChooseSupportSolver


class BattleChooseSolver:
    def run(
        self,
        level_name: str,
        opers: list,
        groups: list = [],
        squad: int = None,
        support_oper: list = [],
    ):
        """
        Args:
            level_name: 关卡名
            opers: 干员列表
            groups: 干员组列表
            squad: 队伍编号
            support_oper: 助战干员
            elite: 助战干员精英化等级的最低要求
            level: 助战干员等级的最低要求
            retry_times: 助战刷新次数
        """
        if squad:
            ChooseSquadSolver().run(level_name, squad)
        lack = BattleAgentChooseSolver().run(opers + groups)
        support_oper = support_oper if support_oper else lack
        ChooseSupportSolver().run(support_oper, level_name)
