예제 #1
0
        static void Main(string[] args)
        {
            BLChallenge solver = new BLChallenge();
            DateTime startTime = DateTime.Now;
            int tryCounter = 0;
            while (!solver.IsSolved())
            {
                tryCounter++;
                if (tryCounter % 250000 == 0)
                    Console.WriteLine(tryCounter);

                solver.Scramble();
            }
            Console.WriteLine("Solution found after {0} iterations, {1} minutes", tryCounter, (DateTime.Now - startTime).TotalMinutes);
            solver.Print();
        }
예제 #2
0
        static void Main(string[] args)
        {
            BLChallenge solver     = new BLChallenge();
            DateTime    startTime  = DateTime.Now;
            int         tryCounter = 0;

            while (!solver.IsSolved())
            {
                tryCounter++;
                if (tryCounter % 250000 == 0)
                {
                    Console.WriteLine(tryCounter);
                }

                solver.Scramble();
            }
            Console.WriteLine("Solution found after {0} iterations, {1} minutes", tryCounter, (DateTime.Now - startTime).TotalMinutes);
            solver.Print();
        }