Fixed an issue with switching between repair types.

This commit is contained in:
Brianna 2020-10-16 13:28:47 -05:00
parent ab480dc587
commit 07a334d1b9

View File

@ -41,9 +41,9 @@ public enum RepairType {
}
public RepairType getNext(Player player) {
for (int i = 0; i < values().length; i++) {
for (int i = 1; i < values().length + 1; i++) {
int index = ordinal();
int nextIndex = index + 1;
int nextIndex = index + i;
RepairType[] cars = RepairType.values();
nextIndex %= cars.length;
RepairType type = cars[nextIndex];