Fixed Player.compareTo() to sort by games sat, decreasing.
This commit is contained in:
parent
5d6f5882de
commit
68e5701f50
@ -1,4 +1,4 @@
|
||||
log4j.rootLogger=TRACE,stdout
|
||||
log4j.rootLogger=INFO,stdout
|
||||
log4j.com.jdbernard.teammaker=TRACE,file
|
||||
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
|
@ -5,7 +5,7 @@ public class Player implements Comparable<Player> {
|
||||
int gamesSat
|
||||
|
||||
public int compareTo(Player that) {
|
||||
int r = this.gamesSat - that.gamesSat
|
||||
int r = that.gamesSat - this.gamesSat
|
||||
if (r == 0) r = this.name.compareTo(that.name)
|
||||
return r
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user