private static HashMap<Integer, Integer> mapCorners(char[] state) {
		HashMap<Integer, Integer> result = new HashMap<Integer, Integer>();
		int[][] corners = Cube.CORNERS;
		HashMap<String, Integer> goalCorners = initGoalCorners();
		for(int j = 0; j < corners.length; j++) {
			String needle = "";
			for (int s : corners[j]) {
				needle += state[s];
			}
			char[] chars = needle.toCharArray();
			Arrays.sort(chars);
			result.put(goalCorners.get(new String(chars)), j);
		}
		return result;
	}