public void RunTest()
        {
            RubicsCubeSolver cube = new RubicsCubeSolver();

            cubeAlg = new SimpleCubeAlgorithm();

            List <Move> shuffleMoves = cube.ShuffleCube(200);

            cubeAlg.DoMoves(shuffleMoves);

            while (!cubeAlg.IsSolved())
            {
                List <Move> solution    = cubeAlg.GetNextSolutionMoves();
                string      description = cubeAlg.GetNextSolutionMovesDescription();

                Console.WriteLine(description);
                solution.ForEach(m => Console.Write("{0} ", m));
                Console.WriteLine();

                cubeAlg.DoMoves(solution);
                cube.DoMoves(solution);
            }

            Debug.Assert(cube.IsSolved());
        }
Beispiel #2
0
 public LearningAC()
 {
     cubeAlgorithm  = new TestCubeAlgorithm();
     board          = (IBoardController)GameObject.FindGameObjectWithTag("Board").GetComponentInChildren(typeof(IBoardController));
     cubeController = new TestCubeController();
     UpdateData();
     board.ActivateAnimation(true);
 }