Merge fix

This commit is contained in:
Oleg Agafonov 2023-12-14 22:25:45 +04:00
parent 10641f8d63
commit 0dbd86fb58
2 changed files with 11 additions and 11 deletions

View file

@ -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());