Пример #1
0
    def test_solution(self):
        for i in range(1):
            c = Cube()
            cr = Cube()
            c.shuffle(i)
            cross_steps = WhiteCrossSolver(c).solution()
            solution = self._test_solution(c)
            # Align faces
            while cr.cubies['F'].facings['F'] != c.cubies['F'].facings['F']:
                c.move(Move('Y'))

            for cubie in cr.cubies:
                for facing in cr.cubies[cubie].facings:
                    # Upper cubies aren't positioned
                    if 'U' not in cubie:
                        self.assertEqual(cr.cubies[cubie].facings[facing],
                                         c.cubies[cubie].facings[facing])
Пример #2
0
 def test_solution(self):
     for i in range(10):
         c = Cube()
         c.shuffle(i)
         solution = self._test_solution(c)
         self._check_solution(c, solution)