if (opponent.hasLost() || player.hasWon())
return Integer.MAX_VALUE;
}
int value = player.getLife();
value -= opponent.getLife();
PermanentEvaluator evaluator = new PermanentEvaluator();
for (Permanent permanent: game.getBattlefield().getAllActivePermanents(player.getId())) {
value += evaluator.evaluate(permanent, game);
}
for (Permanent permanent: game.getBattlefield().getAllActivePermanents(player.getId())) {
value -= evaluator.evaluate(permanent, game);
}
value += player.getHand().size();
value -= opponent.getHand().size();
return value;
}