cluescroll: hotcold: Don't access the map twice

This commit is contained in:
sdburns1998
2019-07-07 03:05:01 +02:00
parent f691e28742
commit e74faa9cdf

View File

@@ -171,11 +171,11 @@ public class HotColdClue extends ClueScroll implements LocationClueScroll, Locat
if (digLocations.size() > 10)
{
for (HotColdArea area : locationCounts.keySet())
for (Map.Entry<HotColdArea, Integer> locationCount : locationCounts.entrySet())
{
panelComponent.getChildren().add(LineComponent.builder()
.left(area.getName())
.right(Integer.toString(locationCounts.get(area)))
.left(locationCount.getKey().getName())
.right(Integer.toString(locationCount.getValue()))
.build());
}
}