v0.7.2b: adjusted rankings comparator to account for equal scores
This commit is contained in:
parent
2bd197a5b3
commit
c6e96b9b8e
|
@ -320,7 +320,12 @@ public enum Rankings {
|
||||||
private static final Comparator<Record> scoreComparator = new Comparator<Rankings.Record>() {
|
private static final Comparator<Record> scoreComparator = new Comparator<Rankings.Record>() {
|
||||||
@Override
|
@Override
|
||||||
public int compare( Record lhs, Record rhs ) {
|
public int compare( Record lhs, Record rhs ) {
|
||||||
return (int)Math.signum( rhs.score - lhs.score );
|
int result = (int)Math.signum( rhs.score - lhs.score );
|
||||||
|
if (result == 0) {
|
||||||
|
return (int)Math.signum( rhs.gameID.hashCode() - lhs.gameID.hashCode());
|
||||||
|
} else{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user