feat: add method to end the current turn
This commit is contained in:
parent
3bb6d81b27
commit
dd3201dfd2
@ -75,6 +75,14 @@ public class GameInstance {
|
||||
return manager.startGame(selectedCharacters1, selectedCharacters2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Forcefully ends the current turn.
|
||||
* @return The list of resulting {@link Event}s
|
||||
*/
|
||||
public ArrayList<Event> endTurn() {
|
||||
return manager.endTurn();
|
||||
}
|
||||
|
||||
/**
|
||||
* Produces a {@link EventType#GamestateEvent} for the current {@link GameState}.
|
||||
* @return The resulting event
|
||||
|
@ -112,6 +112,16 @@ class GameStateManager {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Forcefully ends the current turn.
|
||||
* @return The resulting {@link Event}s
|
||||
*/
|
||||
public ArrayList<Event> endTurn() {
|
||||
ArrayList<Event> result = GameLogic.endTurn(state);
|
||||
applyEvents(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Produces a {@link EventType#GamestateEvent} for the current {@link GameState}.
|
||||
* @return The resulting event
|
||||
|
Loading…
Reference in New Issue
Block a user