carrier operations WIP[2]

This commit is contained in:
Vasiliy Horbachenko
2018-06-08 04:46:44 +03:00
parent 3d0babf65f
commit 6e9baa4944
8 changed files with 76 additions and 28 deletions

View File

@@ -89,11 +89,15 @@ class InterceptOperation(Operation):
transport: db.PlaneDict,
airdefense: db.AirDefenseDict,
interceptors: db.PlaneDict):
heading = from_cp.position.heading_between_point(to_cp.position)
distance = from_cp.position.distance_to_point(to_cp.position)
position = from_cp.position.point_from_heading(heading, distance/2)
conflict = Conflict.intercept_conflict(
attacker=attacker,
defender=defender,
position=to_cp.position,
heading=randint(0, 360),
position=position,
heading=heading,
radials=ALL_RADIALS
)