예제 #1
0
        private static void Init()
        {
            if (inited)
            {
                return;
            }
            cs.min2phase.Tools.Init();

            Center1.InitSym();
            Center1.Raw2sym = new int[735471];
            Center1.InitSym2Raw();
            Center1.CreateMoveTable();
            Center1.Raw2sym = null;
            Center1.CreatePrun();

            Center2.Init();

            Center3.Init();

            Edge3.InitMvrot();
            Edge3.InitRaw2Sym();
            Edge3.CreatePrun();

            inited = true;
        }
예제 #2
0
        public static void Init()
        {
            for (int i = 0; i < 12; i++)
            {
                std2rl[rl2std[i]] = i;
            }

            Center3 c = new Center3();

            for (int i = 0; i < 35 * 35 * 12 * 2; i++)
            {
                for (int m = 0; m < 20; m++)
                {
                    c.Setct(i);
                    c.Move(m);
                    Ctmove[i][m] = (char)c.Getct();
                }
            }

            ArrayExtension.Fill(Prun, (sbyte)-1);

            Prun[0] = 0;
            int depth = 0;
            int done  = 1;

            while (done != 29400)
            {
                for (int i = 0; i < 29400; i++)
                {
                    if (Prun[i] != depth)
                    {
                        continue;
                    }
                    for (int m = 0; m < 17; m++)
                    {
                        if (Prun[Ctmove[i][m]] == -1)
                        {
                            Prun[Ctmove[i][m]] = (sbyte)(depth + 1);
                            done++;
                        }
                    }
                }
                depth++;
            }
        }