// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  // Table to merge the coordinates of the UR,UF,UL and UB,DR,DF edges at the beginning of phase2
  private void mergeURtoULandUBtoDF(boolean force) {
    if (!force && MergeURtoULandUBtoDF != null) return;
    MergeURtoULandUBtoDF = new short[336][336];

    /* for i, j < 336 the six edges UR,UF,UL,UB,DR,DF are not in the UD-slice and the index is < 20160 */
    for (short uRtoUL = 0; uRtoUL < 336; uRtoUL++) {
      for (short uBtoDF = 0; uBtoDF < 336; uBtoDF++) {
        MergeURtoULandUBtoDF[uRtoUL][uBtoDF] = (short) CubieCube.getURtoDF(uRtoUL, uBtoDF);
      }
    }
  }
  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  // Move table for the permutation of six U-face and D-face edges in phase2. The positions of the
  // DL and DB edges are
  // determined by the parity.
  // URtoDF < 665280 in phase 1
  // URtoDF < 20160 in phase 2
  // URtoDF = 0 for solved cube.
  private void loadURtoDFMoves(boolean force) {
    if (!force && URtoDF_Move != null) return;
    URtoDF_Move = new short[N_URtoDF][N_MOVE];

    CubieCube a = new CubieCube();
    for (short i = 0; i < N_URtoDF; i++) {
      a.setURtoDF(i);
      for (int j = 0; j < 6; j++) {
        for (int k = 0; k < 3; k++) {
          a.edgeMultiply(CubieCube.moveCube[j]);
          URtoDF_Move[i][3 * j + k] =
              (short)
                  a
                      .getURtoDF(); // Table values are only valid for phase 2 moves! For phase 1
                                    // moves, casting to short is not possible.
        }
        a.edgeMultiply(CubieCube.moveCube[j]);
      }
    }
  }