fix: fixed ArrayIndexOOB in getting characters
This commit is contained in:
parent
5202b63c2e
commit
98b47ea688
@ -735,7 +735,7 @@ public class GameLogic {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int p1 = selectedCharacters1.size();
|
int p1 = selectedCharacters1.size();
|
||||||
int all = selectedCharacters1.size() + selectedCharacters2.size();
|
int all = selectedCharacters1.size() + selectedCharacters2.size() - 1; // this is the highest index + 1
|
||||||
|
|
||||||
ArrayList<Integer> characters = new ArrayList<>(selectedCharacters1);
|
ArrayList<Integer> characters = new ArrayList<>(selectedCharacters1);
|
||||||
characters.addAll(selectedCharacters2);
|
characters.addAll(selectedCharacters2);
|
||||||
|
Loading…
Reference in New Issue
Block a user