예제 #1
0
 def test_B_prime(self):
     cube = Cube(self.cube)
     rotate = Cube([[['G', 'B'], ['W', 'Y']], [['B', 'G'], ['G', 'R']],
                    [['R', 'Y'], ['Y', 'W']], [['B', 'O'], ['R', 'W']],
                    [['W', 'R'], ['O', 'Y']], [['O', 'O'], ['B', 'G']]])
     cube.back_rotate(True)
     self.assertEqual(cube, rotate)
예제 #2
0
 def test_F(self):
     cube = Cube(self.cube)
     rotate = Cube([[['O', 'G'], ['Y', 'R']], [['G', 'B'], ['R', 'G']],
                    [['B', 'O'], ['W', 'O']], [['R', 'B'], ['W', 'O']],
                    [['B', 'R'], ['G', 'Y']], [['W', 'W'], ['Y', 'Y']]])
     cube.front_rotate()
     self.assertEqual(cube, rotate)
def main():
    c = Cube()

    cd = Color_Detect()

    (blueColors, redColors, greenColors, orangeColors, whiteColors,
     yellowColors) = cd.get_faces()

    c.sendScramble(blueColors, redColors, greenColors, orangeColors,
                   whiteColors, yellowColors)
    c.display()
예제 #4
0
 def setUp(self):
     self.cube = Cube([[['O', 'G'], ['W', 'Y']], [['B', 'G'], ['G', 'R']],
                       [['R', 'Y'], ['W', 'O']], [['R', 'B'], ['W', 'O']],
                       [['B', 'R'], ['G', 'Y']], [['O', 'W'], ['B', 'Y']]])