another check for gameover

moved isUiSet... to derived class of PlayerController
This commit is contained in:
Maxmtg
2013-05-29 15:03:11 +00:00
parent 066d45fbc3
commit 6be13bcf30
3 changed files with 3 additions and 4 deletions

View File

@@ -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

View File

@@ -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>();

View File

@@ -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
*/ */