def conflicts(cls) -> Iterable[Conflict]: assert cls.game for frontline in cls.game.theater.conflicts(): yield Conflict(cls.game.theater, frontline.control_point_a, frontline.control_point_b, cls.game.player_name, cls.game.enemy_name, cls.game.player_country, cls.game.enemy_country, frontline.position)
def air_conflict(cls) -> Conflict: assert cls.game player_cp, enemy_cp = cls.game.theater.closest_opposing_control_points( ) mid_point = player_cp.position.point_from_heading( player_cp.position.heading_between_point(enemy_cp.position), player_cp.position.distance_to_point(enemy_cp.position) / 2) return Conflict(cls.game.theater, player_cp, enemy_cp, cls.game.player_name, cls.game.enemy_name, cls.game.player_country, cls.game.enemy_country, mid_point)
def air_conflict(cls) -> Conflict: assert cls.game player_cp, enemy_cp = cls.game.theater.closest_opposing_control_points( ) mid_point = player_cp.position.point_from_heading( player_cp.position.heading_between_point(enemy_cp.position), player_cp.position.distance_to_point(enemy_cp.position) / 2, ) return Conflict( cls.game.theater, FrontLine(player_cp, enemy_cp), cls.game.player_faction.name, cls.game.enemy_faction.name, cls.current_mission.country(cls.game.player_country), cls.current_mission.country(cls.game.enemy_country), mid_point, )