コード例 #1
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)
コード例 #2
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"])
コード例 #3
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"])
コード例 #4
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
コード例 #5
0
 def moveToTryPosition(self, cubCurrent, solveMoveList, listMix):
     mixManager = MixManager()
     mixManager.mixRun(listMix, cubCurrent)
     appendListInList(solveMoveList, listMix)
コード例 #6
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"])