public void move(ArrayList<Coordinate> validPaths) {
		boolean catMoved = false;
		int index = 0;
		Coordinate nextCoordinate;
		// shuffling the path
		java.util.Collections.shuffle(validPaths);
		
		nextCoordinate = validPaths.get(index);

		// if only one path is available then move to that coordinate
		if(validPaths.size() == 1) {
			lastLocation = location;
			location = nextCoordinate;
		} 
		else if(validPaths.size() > 1) {
			while(!catMoved && index < validPaths.size()) {
				// the cat should avoid moving to where it just came from
				if(nextCoordinate.equals(lastLocation)) {
					index++;
					nextCoordinate = validPaths.get(index);
				} 
				else {
					lastLocation = location;
					location = nextCoordinate;
					catMoved = true;
				}
			}
		}
	}