Skip to content

Commit

Permalink
Show accessory tier change
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinthegreat1 committed Apr 3, 2024
1 parent 0a2fa0a commit 69d9257
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ static Pair<AccessoryReport, String> calculateReport4Accessory(String accessoryI
.mapToInt(ACCESSORY_TIER)
.max();

if (accessory.tier() > highestTierOfAllCollectedInFamily.getAsInt()) return Pair.of(AccessoryReport.IS_GREATER_TIER, String.format("(%d/%d)", accessory.tier(), maxTierInFamily));
if (accessory.tier() > highestTierOfAllCollectedInFamily.getAsInt()) return Pair.of(AccessoryReport.IS_GREATER_TIER, String.format("(%d→%d/%d)", highestTierOfAllCollectedInFamily.orElse(0), accessory.tier(), maxTierInFamily));

//If this accessory is a lower tier than one already obtained from same family
if (accessory.tier() < highestTierOfAllCollectedInFamily.getAsInt()) return Pair.of(AccessoryReport.OWNS_BETTER_TIER, String.format("(%d/%d)", highestTierOfAllCollectedInFamily.orElse(0), maxTierInFamily));
if (accessory.tier() < highestTierOfAllCollectedInFamily.getAsInt()) return Pair.of(AccessoryReport.OWNS_BETTER_TIER, String.format("(%d→%d/%d)", highestTierOfAllCollectedInFamily.orElse(0), accessory.tier(), maxTierInFamily));

//If there is an accessory in the same family that has a higher tier
//Take the accessories in the same family, then check if there is an accessory whose tier is greater than {@code accessory}
Expand Down

0 comments on commit 69d9257

Please sign in to comment.