private int calcCost(List<Integer> moves, boolean caseSwitchNeeded) {
		int cost = 0;
		for(int i=0;i<moves.size()-1;i++)
			if(moves.get(i).equals(moves.get(i+1)))
				cost++;
		if(caseSwitchNeeded && cost == 0)
			cost++;
		return cost + moves.size();
	}