forked from External/mage
Deck editor. Simplify code
This commit is contained in:
parent
ba60a38472
commit
0d3223ff0e
5 changed files with 97 additions and 135 deletions
|
|
@ -39,13 +39,7 @@ public class CardViewCostComparator implements Comparator<CardView> {
|
|||
|
||||
@Override
|
||||
public int compare(CardView o1, CardView o2) {
|
||||
int val = Integer.valueOf(o1.getConvertedManaCost()).compareTo(Integer.valueOf(o2.getConvertedManaCost()));
|
||||
if (val == 0) {
|
||||
return o1.getName().compareTo(o2.getName());
|
||||
}
|
||||
else {
|
||||
return val;
|
||||
}
|
||||
return Integer.valueOf(o1.getConvertedManaCost()).compareTo(Integer.valueOf(o2.getConvertedManaCost()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue