public int getMaxZCaveSpot() {
        int count = caveSpots.size();
        int[] caveSpot;
        int zMax = 0;
        int iMax = -1;
        for(int i = 0; i < count; i++) {
            caveSpot = (int [])caveSpots.get(i);
            if(caveSpot[0] > zMax && caveSpot[2] - caveSpot[1] > 3) {
                zMax = caveSpot[0];
                iMax = i;
            }
        }
        return iMax;
    }