public static byte calcBorderTypeByTileTypeCorners(Tile tile, Point[] surrPoints, boolean biome) {
		Tile[] sTiles = Utils.surroundingPointsToTiles(surrPoints);
		if (sTiles.length == 8) {
			if (!isDifferent(sTiles[4], tile, biome) && isDifferent(sTiles[5], tile, biome) && isDifferent(sTiles[6], tile, biome) && isDifferent(sTiles[7], tile, biome)) {
				return Borders.UL_CORNER_EMPTY;
			} else if (!isDifferent(sTiles[5], tile, biome) && isDifferent(sTiles[4], tile, biome) && isDifferent(sTiles[6], tile, biome) && isDifferent(sTiles[7], tile, biome)) {
				return Borders.UR_CORNER_EMPTY;
			} else if (!isDifferent(sTiles[6], tile, biome) && isDifferent(sTiles[5], tile, biome) && isDifferent(sTiles[4], tile, biome) && isDifferent(sTiles[7], tile, biome)) {
				return Borders.DR_CORNER_EMPTY;
			} else if (!isDifferent(sTiles[7], tile, biome) && isDifferent(sTiles[5], tile, biome) && isDifferent(sTiles[6], tile, biome) && isDifferent(sTiles[4], tile, biome)) {
				return Borders.DL_CORNER_EMPTY;
			} else if (!(isDifferent(sTiles[4], tile, biome) && isDifferent(sTiles[6], tile, biome)) && isDifferent(sTiles[5], tile, biome) && isDifferent(sTiles[7], tile, biome)) {
				return Borders.UL_DR_CORNER_EMPTY;
			} else if (!(isDifferent(sTiles[5], tile, biome) && isDifferent(sTiles[7], tile, biome)) && isDifferent(sTiles[4], tile, biome) && isDifferent(sTiles[6], tile, biome)) {
				return Borders.UR_DL_CORNER_EMPTY;
			} else if (cornersSurrounded(tile, sTiles, biome)) {
				return Borders.SURROUNDED_CORNER;
			} else if (isDifferent(sTiles[6], tile, biome) && isDifferent(sTiles[7], tile, biome) && !(isDifferent(sTiles[4], tile, biome) && isDifferent(sTiles[5], tile, biome))) {
				return Borders.DL_DR_CORNER;
			} else if (isDifferent(sTiles[4], tile, biome) && isDifferent(sTiles[7], tile, biome) && !(isDifferent(sTiles[6], tile, biome) && isDifferent(sTiles[5], tile, biome))) {
				return Borders.UL_DL_CORNER;
			} else if (isDifferent(sTiles[4], tile, biome) && isDifferent(sTiles[5], tile, biome) && !(isDifferent(sTiles[6], tile, biome) && isDifferent(sTiles[7], tile, biome))) {
				return Borders.UL_UR_CORNER;
			} else if (isDifferent(sTiles[6], tile, biome) && isDifferent(sTiles[5], tile, biome) && !(isDifferent(sTiles[4], tile, biome) && isDifferent(sTiles[7], tile, biome))) {
				return Borders.UR_DR_CORNER;
			} else if (isDifferent(sTiles[6], tile, biome) && otherSame(sTiles[6], sTiles, biome)) {
				return Borders.DOWN_RIGHT_CORNER;
			} else if (isDifferent(sTiles[7], tile, biome) && otherSame(sTiles[7], sTiles, biome)) {
				return Borders.DOWN_LEFT_CORNER;
			} else if (isDifferent(sTiles[4], tile, biome) && otherSame(sTiles[4], sTiles, biome)) {
				return Borders.UP_LEFT_CORNER;
			} else if (isDifferent(sTiles[5], tile, biome) && otherSame(sTiles[5], sTiles, biome)) {
				return Borders.UP_RIGHT_CORNER;
			}  
		}
		
		return 0;
	}