Back to project page RussianTripleForAndroid.
The source code is released under:
GNU General Public License
If you think the Android project RussianTripleForAndroid 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 eu.veldsoft.russian.triple; /*from w w w. jav a2 s . co m*/ import java.util.Comparator; public class NoTrumpComparator implements Comparator<Card> { @Override public int compare(Card lhs, Card rhs) { if (lhs.getSuit().getOrder() > rhs.getSuit().getOrder()) { return -1; } else if (lhs.getSuit().getOrder() < rhs.getSuit().getOrder()) { return +1; } else { if (lhs.getRank().getPoints() > rhs.getRank().getPoints()) { return -1; } else if (lhs.getRank().getPoints() < rhs.getRank().getPoints()) { return +1; } } return 0; } }