Skip to content

Commit

Permalink
Fix has highest tier
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinthegreat1 committed Apr 14, 2024
1 parent ddd068b commit d894aa7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static Pair<AccessoryReport, String> calculateReport4Accessory(String accessoryI
.max(Comparator.comparingInt(ACCESSORY_TIER));
int maxTierInFamily = highestTierOfFamily.orElse(Accessory.EMPTY).tier();

if (collectedAccessoriesInTheSameFamily.stream().anyMatch(ca -> ca.tier() == maxTierInFamily)) return Pair.of(AccessoryReport.HAS_HIGHEST_TIER, null);
if (accessory.tier() == maxTierInFamily) return Pair.of(AccessoryReport.HAS_HIGHEST_TIER, null);

//If this accessory is a higher tier than all the other collected accessories in the same family
OptionalInt highestTierOfAllCollectedInFamily = collectedAccessoriesInTheSameFamily.stream()
Expand Down

0 comments on commit d894aa7

Please sign in to comment.