Beispiel #1
0
        protected static void initUDSliceMoveConj()
        {
            CubieCube c = new CubieCube();
            CubieCube d = new CubieCube();

            for (int i = 0; i < N_SLICE; i++)
            {
                c.setUDSlice(i);
                for (int j = 0; j < N_MOVES; j += 3)
                {
                    CubieCube.EdgeMult(c, CubieCube.moveCube[j], d);
                    UDSliceMove[i, j] = (char)d.getUDSlice();
                }
                for (int j = 0; j < 16; j += 2)
                {
                    CubieCube.EdgeConjugate(c, CubieCube.SymInv[j], d);
                    UDSliceConj[i, j >> 1] = (char)(d.getUDSlice() & 0x1ff);
                }
            }
            for (int i = 0; i < N_SLICE; i++)
            {
                for (int j = 0; j < N_MOVES; j += 3)
                {
                    int udslice = UDSliceMove[i, j];
                    for (int k = 1; k < 3; k++)
                    {
                        int cx = UDSliceMove[udslice & 0x1ff, j];
                        udslice = Util.permMult[udslice >> 9, cx >> 9] << 9 | cx & 0x1ff;
                        UDSliceMove[i, j + k] = (char)udslice;
                    }
                }
            }
        }
Beispiel #2
0
 internal virtual void set(CubieCube cc)
 {
     twist = cc.getTwistSym();
     flip  = cc.getFlipSym();
     slice = cc.getUDSlice();
     tsym  = twist & 7;
     twist = twist >> 3;
     fsym  = flip & 7;
     flip  = flip >> 3;
 }
Beispiel #3
0
 internal override void set(CubieCube cc)
 {
     twist  = cc.getTwist();
     flip   = cc.getUDSliceFlipSym();
     slice  = cc.getUDSlice();
     fsym   = flip & 0xf;
     flip >>= 4;
     if (Search.EXTRA_PRUN_LEVEL > 1)
     {
         tsym = cc.getCComb(); //tsym -> CComb
     }
 }