Skip to content

Cubes created from FaceletCube::from(faces) are invalid #108

@deavid

Description

@deavid

In cube.rs, the new function initializes as:

            .enumerate()
            .map(|(i, s)| (*s, i as u16))

Effectively adding the number of the position of the original vec inside as extra info.

While on the from function:

            faces: faces.iter().map(|f| (*f, 0)).collect(),

Sets all indices to zero.

As a result, calling cubesim::solve(&cube) will always return None for cubes that are created with the from function instead of new.

This makes impossible to use this library for arbitrary cubes where we don't know the rotations made to get into that position.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions