naval intercept operation; package refactoring

This commit is contained in:
Vasyl Horbachenko
2018-06-18 23:57:02 +03:00
parent 3e2f3c6f89
commit e2dbaa100f
33 changed files with 974 additions and 602 deletions

View File

@@ -88,13 +88,6 @@ class Base:
total_scrambled += PLANES_IN_GROUP
yield total_scrambled < total_planes and PLANES_IN_GROUP or total_planes - total_scrambled
def _group_sizes_for(self, target: ControlPoint) -> typing.List[int]:
total_planes = target.importance * PLANES_IMPORTANCE_FACTOR
total_scrambled = 0
for _ in range(math.ceil(total_planes / PLANES_IN_GROUP)):
total_scrambled += PLANES_IN_GROUP
yield PLANES_IN_GROUP and total_scrambled < total_planes or total_planes - total_scrambled
def append_commision_points(self, for_type, points: float) -> int:
self.commision_points[for_type] = self.commision_points.get(for_type, 0) + points
points = self.commision_points[for_type]