Example #1
0
def do_logic():
    cubearraycopy=copy.deepcopy(cube.cubearray)
    cr = cross.makecross(cubearraycopy)
    f2 = f2l.dof2l(cubearraycopy)
    ol = oll.solveoll(cubearraycopy)
    pl = pll.solvepll(cubearraycopy)
    cube.set_solution(get_full_sol(cr + " " + f2 + " " + ol + " " + pl))
    kellogs.write(_py_to_ard(cube.thesolution.split(" ")).encode())
    global handle_check_serial
    handle_check_serial=ml.set_alarm_in(1,check_serial,"")
    handle_loading=ml.set_alarm_in(0.5,loadingstatus,"")
Example #2
0
                col[i][j] = "red"
            if j > 5 and j < 9:
                col[i][j] = "green"
            if j > 8 and j < 12:
                col[i][j] = "orange"
        if j > 5 and j < 9 and i > 5:
            col[i][j] = "white"

scramble = input("enter scramble")
moves.breakscram(scramble, col)
logs.write(str(col))

t = time.time()
cr = cross.makecross(col)
f2 = f2l.dof2l(col)
ol = oll.solveoll(col)
pl = pll.solvepll(col)

print("cross", cr)
print("f2l", f2)
print("oll", ol)
print("pll", pl)
fullsol = cr + " " + f2 + " " + ol + " " + pl

print("------------------")

fullsol = fullsol.replace("R R'", "")
fullsol = fullsol.replace("L L'", "")
fullsol = fullsol.replace("F F'", "")
fullsol = fullsol.replace("D D'", "")
fullsol = fullsol.replace("B B'", "")