Commit ecbc2f95 authored by Anthony Calosa's avatar Anthony Calosa

Merge remote-tracking branch 'remotes/core/master' into newBranch

# Conflicts:
#	forge-ai/src/main/java/forge/ai/AiController.java
parents fee8a918 4a7bb4e0
......@@ -610,15 +610,13 @@ public class AiController {
ComputerUtilAbility.getAvailableCards(game, player);
List<SpellAbility> all = ComputerUtilAbility.getSpellAbilities(cards, player);
try {
Collections.sort(all, saComparator); // put best spells first
}
catch (IllegalArgumentException ex) {
System.err.println(ex.getMessage());
String assertex = ComparatorUtil.verifyTransitivity(saComparator, all);
if (!assertex.isEmpty())
Sentry.capture(ex.getMessage() + "\nAssertionError [verifyTransitivity]: " + assertex);
ComparatorUtil.verifyTransitivity(saComparator, all);
}
for (final SpellAbility sa : ComputerUtilAbility.getOriginalAndAltCostAbilities(all, player)) {
......@@ -1581,14 +1579,13 @@ public class AiController {
private SpellAbility chooseSpellAbilityToPlayFromList(final List<SpellAbility> all, boolean skipCounter) {
if (all == null || all.isEmpty())
return null;
try {
Collections.sort(all, saComparator); // put best spells first
}
catch (IllegalArgumentException ex) {
System.err.println(ex.getMessage());
String assertex = ComparatorUtil.verifyTransitivity(saComparator, all);
if (!assertex.isEmpty())
Sentry.capture(ex.getMessage() + "\nAssertionError [verifyTransitivity]: " + assertex);
ComparatorUtil.verifyTransitivity(saComparator, all);
}
for (final SpellAbility sa : ComputerUtilAbility.getOriginalAndAltCostAbilities(all, player)) {
......@@ -2138,6 +2135,6 @@ public class AiController {
// happens here.
return Iterables.getFirst(list, null);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment