package engine.loot; import java.util.ArrayList; public class ItemTable { public ArrayList rows = new ArrayList<>(); public ItemTableRow getRowForRange(int roll) { if (roll > 320) roll = 320; ItemTableRow outRow = null; for (ItemTableRow iteration : this.rows) if (roll >= iteration.minRoll && roll <= iteration.maxRoll) outRow = iteration; return outRow; } }