forked from External/mage
Merge fix
This commit is contained in:
parent
10641f8d63
commit
0dbd86fb58
2 changed files with 11 additions and 11 deletions
|
|
@ -16,17 +16,17 @@ public class MulliganDefaultHandSorter implements Comparator<Card> {
|
|||
// groups: lands > other > creatures
|
||||
// inside group: by mana value, by name
|
||||
|
||||
// lands
|
||||
// lands (lands first)
|
||||
if (c1.isLand() != c2.isLand()) {
|
||||
return Boolean.compare(c2.isLand(), c1.isLand());
|
||||
}
|
||||
// creatures
|
||||
// creatures (others first, then creatures)
|
||||
if (c1.isCreature() != c2.isCreature()) {
|
||||
return Boolean.compare(c1.isCreature(), c2.isCreature());
|
||||
}
|
||||
// by mana
|
||||
// by mana (from big to low)
|
||||
if (c1.getManaValue() != c2.getManaValue()) {
|
||||
return Integer.compare(c1.getManaValue(), c2.getManaValue());
|
||||
return Integer.compare(c2.getManaValue(), c1.getManaValue());
|
||||
}
|
||||
// by name
|
||||
return c1.getName().compareTo(c2.getName());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue