public static boolean isContinuous(List<Location> l){
		List<Location> copy = new ArrayList<Location>(l);
		sortLocation(copy);
		int dir = getDirection(copy);
		if(dir == INVALID_DIR)
			return false;
		Location prevLoc = null;
		for(int i=0;i<copy.size();i++){
			Location curr = copy.get(i);
			if(prevLoc!=null){
				if(dir == HORIZONTAL && ((curr.getX()-prevLoc.getX()) != 1) ){
					return false;
				}
				else if(dir == VERTICAL && ((curr.getY() - prevLoc.getY())!=1)){
					return false;
				}
			}
			prevLoc = curr;
		}
		return true;
	}