Archived
0

filtered noprofit systems

This commit is contained in:
Mo
2016-12-03 16:22:13 +03:00
parent 8c434da461
commit 506536c51b

View File

@@ -146,6 +146,7 @@ public class PowerPlayAnalyzator {
return candidates.stream() return candidates.stream()
.map(candidatesMapper) .map(candidatesMapper)
.filter(IntersectData::isIntersect) .filter(IntersectData::isIntersect)
.filter(d -> d.getIncome() - d.getStarSystem().computeUpkeep(headquarter) > 0)
.sorted((d1, d2) -> { .sorted((d1, d2) -> {
double upkeep1 = d1.getStarSystem().computeUpkeep(headquarter); double upkeep1 = d1.getStarSystem().computeUpkeep(headquarter);
double upkeep2 = d2.getStarSystem().computeUpkeep(headquarter); double upkeep2 = d2.getStarSystem().computeUpkeep(headquarter);