[Fix] WeightedList does not always return a value

This commit is contained in:
Frank 2022-07-08 00:13:07 +02:00
parent 8861c0645f
commit c4077a42fd

View file

@ -93,6 +93,7 @@ public class WeightedList<T> {
if (weight <= weights.get(i)) {
return values.get(i);
}
weight -= weights.get(i);
}
return null;
}