wip: implement post turn handling
This commit is contained in:
@ -5,6 +5,7 @@ import uulm.teamname.marvelous.gamelibrary.events.Event;
|
||||
import uulm.teamname.marvelous.gamelibrary.events.EventType;
|
||||
import uulm.teamname.marvelous.gamelibrary.requests.Request;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Observer;
|
||||
|
||||
/** Represents a game instance. */
|
||||
@ -36,6 +37,12 @@ public class GameInstance {
|
||||
public boolean checkRequestsAndApply(Request... requests) {
|
||||
if(manager.processRequests(requests, true)) {
|
||||
emit(manager.apply());
|
||||
|
||||
Event[] result = manager.checkPostPhase();
|
||||
if(result.length > 0) {
|
||||
emit(result);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user