mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Added basic AI support for Fell the Mighty.
This commit is contained in:
@@ -59,6 +59,15 @@ public class CardLists {
|
||||
});
|
||||
}
|
||||
|
||||
public static CardCollection filterPower(final Iterable<Card> in, final int atLeastPower) {
|
||||
return CardLists.filter(in, new Predicate<Card>() {
|
||||
@Override
|
||||
public boolean apply(Card c) {
|
||||
return c.getNetPower() >= atLeastPower;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static final Comparator<Card> ToughnessComparator = new Comparator<Card>() {
|
||||
@Override
|
||||
public int compare(final Card a, final Card b) {
|
||||
@@ -99,6 +108,18 @@ public class CardLists {
|
||||
Collections.sort(list, CmcComparatorInv);
|
||||
} // sortCMC
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* sortAttackLowFirst.
|
||||
* </p>
|
||||
*
|
||||
* @param list
|
||||
* a {@link forge.CardList} object.
|
||||
*/
|
||||
public static void sortByToughnessAsc(final List<Card> list) {
|
||||
Collections.sort(list, ToughnessComparator);
|
||||
} // sortAttackLowFirst()
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* sortAttackLowFirst.
|
||||
|
||||
Reference in New Issue
Block a user