If match timer is used, the AI consumes now also time for their priority action. Some minor changes to Gamemanager.

This commit is contained in:
LevelX2 2014-09-03 09:49:44 +02:00
parent e8a72466d6
commit cb6cc62ed4
5 changed files with 98 additions and 58 deletions

View file

@ -728,7 +728,14 @@ public class ComputerPlayer extends PlayerImpl implements Player {
@Override
public boolean priority(Game game) {
game.resumeTimer(playerId);
log.debug("priority");
boolean result = priorityPlay(game);
game.pauseTimer(playerId);
return result;
}
private boolean priorityPlay(Game game) {
UUID opponentId = game.getOpponents(playerId).iterator().next();
if (game.getActivePlayerId().equals(playerId)) {
if (game.isMainPhase() && game.getStack().isEmpty()) {
@ -815,11 +822,10 @@ public class ComputerPlayer extends PlayerImpl implements Player {
break;
}
}
pass(game);
pass(game);
return true;
}
@Override
public boolean activateAbility(ActivatedAbility ability, Game game) {
for (Target target: ability.getModes().getMode().getTargets()) {