Skip to content

Instantly share code, notes, and snippets.

@tmn
Created February 25, 2014 21:11
Show Gist options
  • Save tmn/9217846 to your computer and use it in GitHub Desktop.
Save tmn/9217846 to your computer and use it in GitHub Desktop.
if (this.value) {
if (card1.getNumber() == 1) {
card1.setNumber(14);
}
if (card1.getNumber() == 1) {
card2.setNumber(14);
}
}
if (this.type) {
if (card1.getType() == this.type && card2.getType != this.type) {
return 1;
}
else if (card1.getType() != this.type && card2.getType == this.type) {
return -1;
}
}
else {
return card1.compareTo(card2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment