Esempio n. 1
0
 def twistMove(self):
     a = CubieCube()
     for i in range(self.N_TWIST):
         a.setTwist(i)
         for j in range(6):
             for k in range(3):
                 a.cornerMultiply(CubieCube.moveCube(j))
                 self.twistMove[i][3 * j + k] = a.getTwist()
             a.cornerMultiply(CubieCube.moveCube[j])
Esempio n. 2
0
    def randomCube(self):
        import random

        """ generated source for method randomCube """
        cc = CubieCube()
        cc.setFlip(int(random.randint(0, CoordCube.N_FLIP)))
        cc.setTwist(int(random.randint(0, CoordCube.N_TWIST)))
        while True:
            cc.setURFtoDLB(random.randint(0, CoordCube.N_URFtoDLB))
            cc.setURtoBR(random.randint(0, CoordCube.N_URtoBR))
            if not (((cc.edgeParity() ^ cc.cornerParity()) != 0)):
                break
        fc = cc.toFaceCube()
        return fc.to_String()