mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +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");
|
System.out.print(" >>\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( game.isGameOver() ) return; // conceded?
|
||||||
|
|
||||||
// actingPlayer is the player who may act
|
// actingPlayer is the player who may act
|
||||||
// the firstAction is the player who gained Priority First in this segment
|
// the firstAction is the player who gained Priority First in this segment
|
||||||
// of Priority
|
// of Priority
|
||||||
|
|||||||
@@ -54,9 +54,6 @@ public abstract class PlayerController {
|
|||||||
return phase.isBefore(autoPassUntil);
|
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
|
// Triggers preliminary choice: ask, decline or play
|
||||||
private Map<Integer, Boolean> triggersAlwaysAccept = new HashMap<Integer, Boolean>();
|
private Map<Integer, Boolean> triggersAlwaysAccept = new HashMap<Integer, Boolean>();
|
||||||
|
|||||||
@@ -56,11 +56,11 @@ public class PlayerControllerHuman extends PlayerController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isUiSetToSkipPhase(final Player turn, final PhaseType phase) {
|
public boolean isUiSetToSkipPhase(final Player turn, final PhaseType phase) {
|
||||||
return !CMatchUI.SINGLETON_INSTANCE.stopAtPhase(turn, phase);
|
return !CMatchUI.SINGLETON_INSTANCE.stopAtPhase(turn, phase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Uses GUI to learn which spell the player (human in our case) would like to play
|
* Uses GUI to learn which spell the player (human in our case) would like to play
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user