project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/Player.java
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/Player.java Sun Sep 16 17:42:48 2012 +0200
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/Player.java Sun Sep 16 22:31:34 2012 +0200
@@ -40,9 +40,13 @@
+ ", admin=" + admin + "]";
}
- public static Comparator<Player> NAME_ORDER = new Comparator<Player>() {
+ public static Comparator<Player> ADMIN_NAME_ORDER = new Comparator<Player>() {
public int compare(Player lhs, Player rhs) {
- return lhs.name.compareToIgnoreCase(rhs.name);
+ if(lhs.admin != rhs.admin) {
+ return lhs.admin ? -1 : 1;
+ } else {
+ return lhs.name.compareToIgnoreCase(rhs.name);
+ }
}
};
}