Back to project page iSlide.
The source code is released under:
MIT License
If you think the Android project iSlide listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package edu.csun.group2.islide.engine; /*from ww w. ja v a 2 s . com*/ import java.util.Comparator; public class MoveComparator implements Comparator<Move> { @Override public int compare(Move x, Move y) { // Assume neither string is null. Real code should // probably be more robust if ((x.h + x.g) < (y.h + y.g)) { return -1; } if ((x.h + x.g) > (y.h + y.g)) { return 1; } return 0; } }