dwalton76 / rubiks-color-resolver

Resolve rubiks cube RGB values to the six cube colors
MIT License
35 stars 15 forks source link

3x3x3 cubes: use parity to produce a valid cube #2

Closed dwalton76 closed 6 years ago

dwalton76 commented 6 years ago

Today it is possible for rubiks-color-resolver to assign colors to a 3x3x3 cube in a way that produces an invalid cube. The kociemba solver will return an error if you give it an invalid cube.

We should be able to use edge and corner parity to determine if the cube is valid and if not, adjust some things to produce a valid cube.

dwalton76 commented 6 years ago

rubiks-color-resolver.html.zip

Example where we create an invalid cube

dwalton76 commented 6 years ago

fixed