Closed ansiwen closed 8 years ago
Looking good! Did you consider making the same changes to the C version or shall I do it myself? Should be very easy since the implementations are virtually equivalent.
I'm not 100% sure what you mean. The code where I implemented this, the wrapper function for both the C and Python solver in __init__.py
, doesn't have an equivalent in the c-code. I could implement it in the CLI tool (ckociemba/solve.c), but maybe it would be better then to move the code into the solution() functions, which exist in both the C and Python versions. Another problem is, that toFaceCube() in ckociemba/include/cubiecube.h is commented out. Is there a problem with that code?
Sorry for that. The idea is, I'd like the C version to be full-featured so that it can be used on its own without losing features. The wrapper function is basically choosing between the C and Python versions of the same function (Search.solution()).
Since we are adding a new feature here, I just want it to be present both in C and Python versions of this library, and keep __init__.py
to be a very thin wrapper.
Regarding the commented code, there shouldn't be problems with it. It is probably commented out because it is not needed for solving. Initially I started this project because I needed python implementation for our FAC cube solver. But now I'm going to make a proper library out of it.
So my suggestion is: let's merge your changes to develop, since it is fine for Python use-case. And I'll create an issue for implementing this in C part as well. Is this fine by you?
This PR is merged manually into develop branch. Will be pushed to master with the next release.
As described in #6