project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/netplay/Teamlist.java
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/netplay/Teamlist.java Sat Aug 18 00:22:33 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-package org.hedgewars.hedgeroid.netplay;
-
-import java.util.Collection;
-
-import org.hedgewars.hedgeroid.Datastructures.TeamInGame;
-import org.hedgewars.hedgeroid.Datastructures.TeamIngameAttributes;
-
-import android.util.Pair;
-
-public class Teamlist extends ObservableTreeMap<String, Pair<TeamInGame, Long>> {
- private long nextId = 1;
-
- public void addTeamWithNewId(TeamInGame team) {
- put(team.team.name, Pair.create(team, nextId++));
- }
-
- public int getUnusedOrRandomColorIndex() {
- Collection<Pair<TeamInGame, Long>> teams = getMap().values();
- int[] illegalColors = new int[teams.size()];
- int i=0;
- for(Pair<TeamInGame, Long> item : teams) {
- illegalColors[i] = item.first.ingameAttribs.colorIndex;
- i++;
- }
- return TeamIngameAttributes.randomColorIndex(illegalColors);
- }
-}