refactor: changed returnType of checkRequestsAndApply to list
This commit is contained in:
parent
141469c11f
commit
0572450ced
@ -8,6 +8,7 @@ import uulm.teamname.marvelous.gamelibrary.json.config.ScenarioConfig;
|
||||
import uulm.teamname.marvelous.gamelibrary.requests.Request;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/** Represents a game instance. */
|
||||
@ -33,7 +34,7 @@ public class GameInstance {
|
||||
* @param requests The requests to check
|
||||
* @return The list of resulting {@link Event}s or `null` if the check failed
|
||||
*/
|
||||
public Optional<ArrayList<Event>> checkRequestsAndApply(Request... requests) {
|
||||
public Optional<List<Event>> checkRequestsAndApply(Request... requests) {
|
||||
if(manager.processRequests(requests, true)) {
|
||||
ArrayList<Event> result = manager.apply();
|
||||
result.addAll(manager.checkPostPhase());
|
||||
|
Loading…
Reference in New Issue
Block a user