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)
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()
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']]])