Ejemplo n.º 1
0
    bool SolveTopCorner_CaseBottom(CubeInfo.Cubie cubie, ref List <string> path)
    {
        ArrayList steps = new ArrayList();

        string[] down  = { "D", "D'", "D2", "" };
        string[] sides = { "L", "L'",
                           "R", "R'",
                           "F", "F'",
                           "B", "B'" };
        string[] D2      = { "D2" };
        string[] reverse = { "X" };

        if (_cubies.FacingDown(cubie))
        {
            Debug.Log("FACING DOWN");
            steps.Add(down);
            steps.Add(sides);
            steps.Add(D2);
            steps.Add(reverse);
        }

        steps.Add(down);
        steps.Add(sides);
        steps.Add(down);
        steps.Add(reverse);

        path = _solver.Search(cubie, _solved, steps, _solver.ScoreSolved);
        if (path.Count != 0)
        {
            _solved.Add(cubie);
        }
        return(_solved.Count >= 8);
    }