// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // Move table for the twists of the corners // twist < 2187 in phase 2. // twist = 0 in phase 2. private void loadTwistMoves(boolean force) { /* only load if not already loaded */ if (!force && twistMove != null) return; twistMove = new short[N_TWIST][N_MOVE]; CubieCube a = new CubieCube(); for (short i = 0; i < N_TWIST; i++) { a.setTwist(i); for (int j = 0; j < 6; j++) { for (int k = 0; k < 3; k++) { a.cornerMultiply(CubieCube.moveCube[j]); twistMove[i][3 * j + k] = a.getTwist(); } a.cornerMultiply(CubieCube.moveCube[j]); // 4. faceturn restores a } } }