forked from External/mage
* GUI: new reworked GUI and card render engine, card icons and dozens of other fixes (see full list in related PR);
This commit is contained in:
parent
df98cc3e62
commit
a1da5ef437
304 changed files with 7266 additions and 5093 deletions
|
|
@ -0,0 +1,23 @@
|
|||
package mage.abilities.icon;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
/**
|
||||
* @author JayDi85
|
||||
*/
|
||||
public enum CardIconComparator implements Comparator<CardIcon> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public int compare(CardIcon a, CardIcon b) {
|
||||
// by icon type
|
||||
int res = Integer.compare(a.getIconType().getSortOrder(), b.getIconType().getSortOrder());
|
||||
|
||||
// by text
|
||||
if (res == 0) {
|
||||
res = String.CASE_INSENSITIVE_ORDER.compare(a.getCombinedInfo(), b.getCombinedInfo());
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue