def __init__(self, *, attacks: Tuple[Tuple[float, int]] = None, structure=1.0, shields=0.0, fighter_capacity=0, fighter_launch_rate=0, fighter_damage=0, flak_shots=0, has_interceptors=False, damage_vs_planets=0, has_bomber=False): self.structure = structure self.shields = shields self.attacks = {} if attacks is None else tuple_to_dict( attacks) # type: Dict[float, int] self.fighter_capacity = fighter_capacity self.fighter_launch_rate = fighter_launch_rate self.fighter_damage = fighter_damage self.flak_shots = flak_shots self.has_interceptors = has_interceptors self.damage_vs_planets = damage_vs_planets self.has_bomber = has_bomber
def __init__(self, attacks, structure, shields): """ :param attacks: :type attacks: dict|None :param structure: :type structure: int|None :param shields: :type shields: int|None :return: """ self.structure = 1 if structure is None else structure self.shields = 0 if shields is None else shields self.attacks = {} if attacks is None else tuple_to_dict(attacks)