Exemplo n.º 1
0
        public static void loadRotationTreeFromFile(RubikFileReader p_File, RotationTree p_tree)
        {
            RotationLinkedList l_rotationLinkedList = new RotationLinkedList();

            while (l_rotationLinkedList.readFromFile(p_File))
            {
                p_tree.addRotationLinkedList(l_rotationLinkedList);
            }
        }
Exemplo n.º 2
0
 public static void loadRotationTreeFromStandard(RotationTree p_tree, RotationLinkedList p_rotationLinkedList, int p_depth)
 {
     if (p_depth == 0)
     {
         return;
     }
     foreach (Face face in Enum.GetValues(typeof(Face)))
     {
         foreach (Direction direction in Enum.GetValues(typeof(Direction)))
         {
             Rotation newRotation = new Rotation(face, direction);
             if (p_rotationLinkedList.isRedundant(newRotation))
             {
                 continue;
             }
             p_rotationLinkedList.addRotation(newRotation);
             p_tree.addRotationLinkedList(p_rotationLinkedList);
             loadRotationTreeFromStandard(p_tree, p_rotationLinkedList, p_depth - 1);
             p_rotationLinkedList.removeRotation();
         }
     }
 }