Beispiel #1
0
 def changeSide(cubCurrent, solveMoveList, face):
     mixManager = MixManager()
     if (face == "front"):
         mixManager.mixRun(["F", "U'", "R", "U"], cubCurrent)
         appendListInList(solveMoveList, ["F", "U'", "R", "U"])
     elif (face == "right"):
         mixManager.mixRun(["R", "U'", "B", "U"], cubCurrent)
         appendListInList(solveMoveList, ["R", "U'", "B", "U"])
     elif (face == "left"):
         mixManager.mixRun(["L", "U'", "F", "U"], cubCurrent)
         appendListInList(solveMoveList, ["L", "U'", "F", "U"])
     elif (face == "back"):
         mixManager.mixRun(["B", "U'", "L", "U"], cubCurrent)
         appendListInList(solveMoveList, ["B", "U'", "L", "U"])
Beispiel #2
0
 def moveSide(self, cubCurrent, solveMoveList, colorOne, colorTwo,
              colorThree, face):
     mixManager = MixManager()
     while ((self.finishedThreeColorPosition(cubCurrent, colorOne, colorTwo,
                                             colorThree)) == False):
         if (face == "front"):
             mixManager.mixRun(["R'", "D'", "R", "D"], cubCurrent)
             appendListInList(solveMoveList, ["R'", "D'", "R", "D"])
         elif (face == "right"):
             mixManager.mixRun(["B'", "D'", "B", "D"], cubCurrent)
             appendListInList(solveMoveList, ["B'", "D'", "B", "D"])
         elif (face == "back"):
             mixManager.mixRun(["L'", "D'", "L", "D"], cubCurrent)
             appendListInList(solveMoveList, ["L'", "D'", "L", "D"])
         elif (face == "left"):
             mixManager.mixRun(["F'", "D'", "F", "D"], cubCurrent)
             appendListInList(solveMoveList, ["F'", "D'", "F", "D"])
Beispiel #3
0
 def cornerChange(self, cubCurrent, solveMoveList, face):
     mixManager = MixManager()
     if (face == "front"):
         mixManager.mixRun(["L", "D", "L'", "D", "L", "D2", "L'", "D"],
                           cubCurrent)
         appendListInList(solveMoveList,
                          ["L", "D", "L'", "D", "L", "D2", "L'", "D"])
     elif (face == "back"):
         mixManager.mixRun(["R", "D", "R'", "D", "R", "D2", "R'", "D"],
                           cubCurrent)
         appendListInList(solveMoveList,
                          ["R", "D", "R'", "D", "R", "D2", "R'", "D"])
     elif (face == "right"):
         mixManager.mixRun(["F", "D", "F'", "D", "F", "D2", "F'", "D"],
                           cubCurrent)
         appendListInList(solveMoveList,
                          ["F", "D", "F'", "D", "F", "D2", "F'", "D"])
     elif (face == "left"):
         mixManager.mixRun(["B", "D", "B'", "D", "B", "D2", "B'", "D"],
                           cubCurrent)
         appendListInList(solveMoveList,
                          ["B", "D", "B'", "D", "B", "D2", "B'", "D"])
Beispiel #4
0
 def moveFormulaRight(self, cubCurrent, solveMoveList, face):
     mixManager = MixManager()
     if (face == "front"):
         mixManager.mixRun(["D'", "R'", "D", "R", "D", "F", "D'", "F'"],
                           cubCurrent)
         appendListInList(solveMoveList,
                          ["D'", "R'", "D", "R", "D", "F", "D'", "F'"])
     elif (face == "left"):
         mixManager.mixRun(["D'", "F'", "D", "F", "D", "L", "D'", "L'"],
                           cubCurrent)
         appendListInList(solveMoveList,
                          ["D'", "F'", "D", "F", "D", "L", "D'", "L'"])
     elif (face == "right"):
         mixManager.mixRun(["D'", "B'", "D", "B", "D", "R", "D'", "R'"],
                           cubCurrent)
         appendListInList(solveMoveList,
                          ["D'", "B'", "D", "B", "D", "R", "D'", "R'"])
     elif (face == "back"):
         mixManager.mixRun(["D", "R", "D'", "R'", "D'", "B'", "D", "B"],
                           cubCurrent)
         appendListInList(solveMoveList,
                          ["D", "R", "D'", "R'", "D'", "B'", "D", "B"])
Beispiel #5
0
 def moveEdgeDown(self, cubCurrent, solveMoveList, colorOne, colorTwo,
                  colorThree):
     self.listPositionCubCurrent = self.updatePositionList(
         cubCurrent, colorOne, colorTwo, colorThree)
     mixManager = MixManager()
     if ((self.listPositionCubCurrent[1][0] == "right"
          and self.listPositionCubCurrent[2][0] == "front")):
         mixManager.mixRun(["F", "D'", "F'"], cubCurrent)
         appendListInList(solveMoveList, ["F", "D'", "F'"])
     elif ((self.listPositionCubCurrent[1][0] == "left"
            and self.listPositionCubCurrent[2][0] == "front")):
         mixManager.mixRun(["F'", "D", "F"], cubCurrent)
         appendListInList(solveMoveList, ["F'", "D", "F"])
     elif ((self.listPositionCubCurrent[1][0] == "right"
            and self.listPositionCubCurrent[2][0] == "back")):
         mixManager.mixRun(["B'", "D", "B"], cubCurrent)
         appendListInList(solveMoveList, ["B'", "D", "B"])
     elif ((self.listPositionCubCurrent[1][0] == "left"
            and self.listPositionCubCurrent[2][0] == "back")):
         mixManager.mixRun(["B", "D'", "B'"], cubCurrent)
         appendListInList(solveMoveList, ["B", "D'", "B'"])
     self.listPositionCubCurrent = self.updatePositionList(
         cubCurrent, colorOne, colorTwo, colorThree)
Beispiel #6
0
 def moveOppositeRibs(self, cubCurrent, solveMoveList, face):
     mixManager = MixManager()
     if (face == "front"):
         mixManager.mixRun(["L", "D", "L'", "D", "L", "D2", "L'"],
                           cubCurrent)
         appendListInList(solveMoveList,
                          ["L", "D", "L'", "D", "L", "D2", "L'"])
     if (face == "right"):
         mixManager.mixRun(["F", "D", "F'", "D", "F", "D2", "F'"],
                           cubCurrent)
         appendListInList(solveMoveList,
                          ["F", "D", "F'", "D", "F", "D2", "F'"])
     return self.moveDown(cubCurrent, solveMoveList)
Beispiel #7
0
 def moveToTryPosition(self, cubCurrent, solveMoveList, listMix):
     mixManager = MixManager()
     mixManager.mixRun(listMix, cubCurrent)
     appendListInList(solveMoveList, listMix)
Beispiel #8
0
    def run(self, cubCurrent, solveMoveList):
        mixManager = MixManager()
        moveList = ["F", "L", "D", "L'", "D'", "F'"]
        one, two = checkBackState(cubCurrent.down, "yellow")
        if (one == 4):
            return True
        if (one == 1):
            mixManager.mixRun(moveList, cubCurrent)
            appendListInList(solveMoveList, moveList)

        one, two = checkBackState(cubCurrent.down, "yellow")
        if (one == 2 and two == 0):
            mixManager.mixRun(moveList, cubCurrent)
            appendListInList(solveMoveList, moveList)
        elif (one == 2 and two == 1):
            mixManager.mixRun(["D'", "F", "L", "D", "L'", "D'", "F'"],
                              cubCurrent)
            appendListInList(solveMoveList,
                             ["D'", "F", "L", "D", "L'", "D'", "F'"])
        elif (one == 2 and two == 2):
            mixManager.mixRun(["D'", "D'", "F", "L", "D", "L'", "D'", "F'"],
                              cubCurrent)
            appendListInList(solveMoveList,
                             ["D'", "D'", "F", "L", "D", "L'", "D'", "F'"])
        elif (one == 2 and two == 3):
            mixManager.mixRun(["D", "F", "L", "D", "L'", "D'", "F'"],
                              cubCurrent)
            appendListInList(solveMoveList,
                             ["D", "F", "L", "D", "L'", "D'", "F'"])
        one, two = checkBackState(cubCurrent.down, "yellow")

        if (one == 3 and two == 0):
            mixManager.mixRun(moveList, cubCurrent)
            appendListInList(solveMoveList, moveList)
        elif (one == 3 and two == 1):
            mixManager.mixRun(["D", "F", "L", "D", "L'", "D'", "F'"],
                              cubCurrent)
            appendListInList(solveMoveList,
                             ["D", "F", "L", "D", "L'", "D'", "F'"])

        one, two = checkBackState(cubCurrent.down, "yellow")
        if (one == 4):
            return True
Beispiel #9
0
	def 	moveSide(self, cubCurrent, solveMoveList, colorsList):
		mixManager = MixManager()
		while (self.finishedThreeColorPosition(cubCurrent, colorsList)) == False:
			mixManager.mixRun(["L'", "U'", "L", "U"], cubCurrent)
			appendListInList(solveMoveList, ["L'", "U'", "L", "U"])