private static Region getClosestNeighborToBorder(BotState state, Region inRegion) {
		List<Region> neighbors = inRegion.getNeighbors();
		// In case two neighbors have the same distance pick the higher ranked
		// one
		Region closestNeighbor = inRegion;
		int minDistance = inRegion.getDistanceToBorder();
		for (Region neighbor : neighbors) {
			if (neighbor.getDistanceToBorder() < minDistance) {
				minDistance = neighbor.getDistanceToBorder();
			}
		}
		int maxValue = 0;
		for (Region neighbor : neighbors) {
			if (neighbor.getDistanceToBorder() == minDistance && neighbor.getAdjustedRegionValue(state) >= maxValue) {
				maxValue = neighbor.getAdjustedRegionValue(state);
				closestNeighbor = neighbor;
			}
		}
		return closestNeighbor;
	}