mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
another check for gameover
moved isUiSet... to derived class of PlayerController
This commit is contained in:
@@ -714,6 +714,8 @@ public class PhaseHandler extends MyObservable implements java.io.Serializable {
|
||||
System.out.print(" >>\n");
|
||||
}
|
||||
|
||||
if ( game.isGameOver() ) return; // conceded?
|
||||
|
||||
// actingPlayer is the player who may act
|
||||
// the firstAction is the player who gained Priority First in this segment
|
||||
// of Priority
|
||||
|
||||
@@ -54,9 +54,6 @@ public abstract class PlayerController {
|
||||
return phase.isBefore(autoPassUntil);
|
||||
}
|
||||
|
||||
public boolean isUiSetToSkipPhase(final Player turn, final PhaseType phase) {
|
||||
return false; // human has it's overload
|
||||
}
|
||||
|
||||
// Triggers preliminary choice: ask, decline or play
|
||||
private Map<Integer, Boolean> triggersAlwaysAccept = new HashMap<Integer, Boolean>();
|
||||
|
||||
@@ -56,10 +56,10 @@ public class PlayerControllerHuman extends PlayerController {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isUiSetToSkipPhase(final Player turn, final PhaseType phase) {
|
||||
return !CMatchUI.SINGLETON_INSTANCE.stopAtPhase(turn, phase);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Uses GUI to learn which spell the player (human in our case) would like to play
|
||||
|
||||
Reference in New Issue
Block a user