private void getCompletedCitiesRecursive(HashSet<BoardPosition> searched,
			HashSet<BoardPosition> toSearch,
			ArrayList<HashSet<BoardPosition>> cities,
			ArrayList<Integer> incompleteCities) {

		// Take a position from the toSearch map to search.
		Iterator<BoardPosition> toSearchIterator = toSearch.iterator();
		BoardPosition boardPosition;

		if (toSearchIterator.hasNext()) {
			boardPosition = toSearchIterator.next();
		} else {
			return;
		}

		int xBoard = boardPosition.xBoard;
		int yBoard = boardPosition.yBoard;
		int xTile = boardPosition.xTile;
		int yTile = boardPosition.yTile;

		Tile currentTile = gameBoard[yBoard][xBoard];

		toSearch.remove(boardPosition);
		searched.add(boardPosition);

		TileType currentTileType = currentTile.getTileType(xTile, yTile);

		// Add neighbors to an array. And run through adding each to toSearch.
		BoardPosition[] neighborTiles = getTileNeighbors(xBoard, yBoard, xTile,
				yTile);

		// Add valid neighbors of position to toSearch map.
		// A neighbor is valid if it is in neither map,
		// and is of the same tile type.
        for (BoardPosition neighborTile : neighborTiles) {
            // Check the tile is not null.
            Tile tile = gameBoard[neighborTile.yBoard][neighborTile.xBoard];

            if (tile != null) {

                // Check that the tile has the same tile type.
                TileType tileType = tile.getTileType(neighborTile.xTile,
                        neighborTile.yTile);

                if (tileType == currentTileType) {

                    BoardPosition toAdd = new BoardPosition(
                            neighborTile.xBoard, neighborTile.yBoard,
                            neighborTile.xTile, neighborTile.yTile);

                    // Check the tile is not already in searched or toSearch.
                    if (!toSearch.contains(toAdd) && !searched.contains(toAdd)) {
                        toSearch.add(toAdd);
                    }
                }

            } else {
                // If we find a null tile, add the city's index to
                // incompleteCities.
                // Do not subtract 1, as the city has yet to be added;
                // Once the city is added to cities, the index will be correct.
                if (!incompleteCities.contains(cities.size())) {
                    incompleteCities.add(cities.size());
                }
            }
        }

		// If toSearch is empty, the add searched to cities. Otherwise recurse.
		if (!toSearch.isEmpty()) {
			getCompletedCitiesRecursive(searched, toSearch, cities,
					incompleteCities);
		} else {
			cities.add(searched);
		}
	}