Archived
0
This commit is contained in:
Mo
2017-01-05 12:25:19 +03:00
parent 347b554299
commit 41e7b7696e

View File

@@ -173,7 +173,7 @@ public class PowerPlayAnalyzator {
public static Stream<IntersectData> getNearExpansions(Stream<Place> starSystems, Collection<Place> centers, double maxDistance){ public static Stream<IntersectData> getNearExpansions(Stream<Place> starSystems, Collection<Place> centers, double maxDistance){
IntersectsMapper mapper = new IntersectsMapper(centers, maxDistance, false, true); IntersectsMapper mapper = new IntersectsMapper(centers, maxDistance, false, true);
return starSystems.filter(new FarDropper(centers, maxDistance)) return starSystems.filter(new FarDropper(centers, maxDistance))
.filter(p -> p.getPowerState().isExpansion()) .filter(p -> p.getPowerState() != null && p.getPowerState().isExpansion())
.map(mapper) .map(mapper)
.sorted(new DistanceComparator()); .sorted(new DistanceComparator());
} }