project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/netplay/Player.java
author Medo <smaxein@googlemail.com>
Mon, 23 Jul 2012 00:17:06 +0200
changeset 7352 641f11cdd319
parent 7342 0e29eec2df5c
child 7358 57a508884052
permissions -rw-r--r--
Hedgeroid: Reworked player and room lists, added menus, added playername query Still work in progress...

package org.hedgewars.hedgeroid.netplay;

import java.util.Comparator;

public class Player {
	public static final ByNameComparator NAME_COMPARATOR = new ByNameComparator(); 

	public final String name;
	public final long id; // for ListView
	
	public Player(String name, long id) {
		this.name = name;
		this.id = id;
	}
	
	private static final class ByNameComparator implements Comparator<Player> {
		public int compare(Player lhs, Player rhs) {
			return lhs.name.compareToIgnoreCase(rhs.name);
		}
	}
}