public ArrayList<ArrayList<JavaPlayer>> getPalaceRanks(JavaCell palace, LinkedList<Developer> gameDevelopers) {
		ArrayList<JavaCell> city = getCityFromRootCell(palace,visitedVillages);

		HashMap<JavaPlayer, Integer> scores = new HashMap<JavaPlayer, Integer>();

		for (JavaCell c : city) {
			if (getDeveloperOnCell(c, gameDevelopers) != null) {
				Developer d = getDeveloperOnCell(c, gameDevelopers);
				JavaPlayer p = d.getOwner();
				int rank = c.getElevation();

				if (!scores.containsKey(p)) {
					scores.put(p, rank);
				} else {
					int newRank = c.getElevation();
					if (newRank > rank)
						scores.put(p, newRank);
				}
			}
		}

		// we now have each player mapped to their rank or not mapped if they
		// don't have a developer
		// on the city.

		ArrayList<Integer> values = new ArrayList<Integer>();
		for (Integer i : scores.values())
			values.add(i);
		Collections.sort(values);
		Collections.reverse(values); // from highest to lowest

		ArrayList<ArrayList<JavaPlayer>> players = new ArrayList<ArrayList<JavaPlayer>>();

		for (Integer i : values) {
			ArrayList<JavaPlayer> rank = new ArrayList<JavaPlayer>();
			for (JavaPlayer p : scores.keySet()) {
				if (scores.get(p) == i)
					rank.add(p);
			}

			players.add(rank);
		}

		return players;
	}