def test_solve_phalanx_possible_1(): # noqa: D103 stack = [ CardGenerator.troop(TroopColors.RED, 9), ] used_cards = [c for c in stack if isinstance(c, TroopCard)] strength, solved = possible_maximum_strength_for_phalanx(stack, 3, used_cards) assert strength == 9 * 3 assert not solved
def test_solve_phalanx_wild(): # noqa: D103 stack = [ CardGenerator.troop(TroopColors.YELLOW, 9), CardGenerator.tactic(TacticMorales.LEADER_DARIUS), CardGenerator.troop(TroopColors.GREEN, 9), ] used_cards = [c for c in stack if isinstance(c, TroopCard)] strength, solved = possible_maximum_strength_for_phalanx(stack, 3, used_cards) assert strength == 9 * 3 assert solved
def test_solve_phalanx_possible_0(): # noqa: D103 stack = [] used_cards = [c for c in stack if isinstance(c, TroopCard)] strength, solved = possible_maximum_strength_for_phalanx(stack, 3, used_cards) assert strength == 10 * 3 assert not solved