Multiple inner classes extracted from LootManager.

This commit is contained in:
2023-08-03 09:43:30 -04:00
parent 0bb756521b
commit fda3386e7b
10 changed files with 161 additions and 132 deletions
+21
View File
@@ -0,0 +1,21 @@
package engine.loot;
import java.util.ArrayList;
public class ItemTable {
public ArrayList<ItemTableRow> 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;
}
}