refactor: changed some ArrayList types to Lists for compatibility
This commit is contained in:
@ -5,6 +5,7 @@ import uulm.teamname.marvelous.gamelibrary.events.EventType;
|
||||
import uulm.teamname.marvelous.gamelibrary.requests.Request;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/** Represents manager for a game state. */
|
||||
class GameStateManager {
|
||||
@ -63,7 +64,7 @@ class GameStateManager {
|
||||
* Applies an array of {@link Event Events} to the game state.
|
||||
* @param events The events to apply
|
||||
*/
|
||||
public void applyEvents(ArrayList<Event> events) {
|
||||
public void applyEvents(List<Event> events) {
|
||||
for(Event event: events) {
|
||||
GameLogic.applyEvent(state, event);
|
||||
}
|
||||
@ -111,7 +112,7 @@ class GameStateManager {
|
||||
* @param selectedCharacters2 The characters selected by player 2
|
||||
* @return The resulting {@link Event Events}
|
||||
*/
|
||||
public ArrayList<Event> startGame(ArrayList<Integer> selectedCharacters1, ArrayList<Integer> selectedCharacters2) {
|
||||
public List<Event> startGame(List<Integer> selectedCharacters1, List<Integer> selectedCharacters2) {
|
||||
GameState snapshot = state.snapshot();
|
||||
|
||||
ArrayList<Event> result = GameLogic.startGame(snapshot, selectedCharacters1, selectedCharacters2);
|
||||
|
Reference in New Issue
Block a user