comparation simplified

This commit is contained in:
vyacheslav.raskulin 2020-09-09 15:00:30 +03:00
parent 022c1407ed
commit 7da043afd0
6 changed files with 12 additions and 18 deletions

View file

@ -332,7 +332,7 @@ public class MageActionCallback implements ActionCallback {
private void sortLayout(List<CardPanel> cards, CardPanel source, boolean includeSource) {
source.getLocation().x -= COMPARE_GAP_X; // this creates nice effect
cards.sort((cp1, cp2) -> Integer.valueOf(cp1.getLocation().x).compareTo(cp2.getLocation().x));
cards.sort(Comparator.comparingInt(cp -> cp.getLocation().x));
int dx = 0;
boolean createdGapForSource = false;