fix: make game logic methods accessible for ai

This commit is contained in:
punchready 2021-07-01 18:32:44 +02:00
parent 1dabd1d25d
commit bacb6a65df

View File

@ -295,7 +295,7 @@ public class GameLogic {
* @param request The request to execute * @param request The request to execute
* @return The list of resulting events * @return The list of resulting events
*/ */
protected static ArrayList<Event> executeRequest(GameState state, Request request) { public static ArrayList<Event> executeRequest(GameState state, Request request) {
ArrayList<Event> result = new ArrayList<>(); ArrayList<Event> result = new ArrayList<>();
switch(request.type) { switch(request.type) {
@ -519,7 +519,7 @@ public class GameLogic {
* @param state The game state to apply to * @param state The game state to apply to
* @param event The event to apply * @param event The event to apply
*/ */
protected static void applyEvent(GameState state, Event event) { public static void applyEvent(GameState state, Event event) {
switch(event.type) { switch(event.type) {
case DestroyedEntityEvent -> { case DestroyedEntityEvent -> {
state.entities.removeEntity(((EntityEvent)event).targetEntity); state.entities.removeEntity(((EntityEvent)event).targetEntity);