adrianliaw / PyCuber

Rubik's Cube solver in Python
MIT License
196 stars 47 forks source link

Support for X Y Z? #20

Closed spaceone closed 6 years ago

spaceone commented 6 years ago

It would be nice if X, Y, and maybe Z would be supported.

>>> pycuber.Cube()("X")                                                                                                                                                                                                                                                          
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/pycuber/cube.py", line 382, in __call__
    return self.perform_algo(algo)
  File "/usr/local/lib/python2.7/dist-packages/pycuber/cube.py", line 571, in perform_algo
    formula = Formula(algo)
  File "/usr/local/lib/python2.7/dist-packages/pycuber/formula.py", line 365, in __init__
    sequence[i] = Step(sequence[i])
  File "/usr/local/lib/python2.7/dist-packages/pycuber/formula.py", line 114, in __init__
    raise ValueError("Invalid action name {0}".format(name))
ValueError: Invalid action name X
spaceone commented 6 years ago

I think it would be easy to implement. X="L' M' R" and Y="D' U E'" and Z="F B' S"

adrianliaw commented 6 years ago

Yes it's implemented, you should use lowercased x, y and z for those moves.