コード例 #1
0
        public void numberNodesRotationTree()
        {
            RotationLinkedList l_rotationLinkedList = new RotationLinkedList();
            RotationTree       l_tree = new RotationTree();

            RotationTreeLoader.loadRotationTreeFromStandard(l_tree, l_rotationLinkedList, 4);
            //   int numberOfNodes = l_tree.getNumberOfNodes();
            //   Assert.AreEqual(11205, numberOfNodes);
        }
コード例 #2
0
        public void loadRotationTreeFromStandard()
        {
            RotationLinkedList l_rotationLinkedList = new RotationLinkedList();
            RotationTree       l_tree = new RotationTree();

            RotationTreeLoader.loadRotationTreeFromStandard(l_tree, l_rotationLinkedList, 1);
            int i = -1;

            foreach (Face face in Enum.GetValues(typeof(Face)))
            {
                foreach (Direction direction in Enum.GetValues(typeof(Direction)))
                {
                    i++;
                    int rotationValue = (new Rotation(face, direction)).getValue();
                    Assert.AreEqual(face, l_tree.getRotationLinkedList(i).get(0).getFace());
                    Assert.AreEqual(direction, l_tree.getRotationLinkedList(i).get(0).getDirection());
                }
            }
        }