Skip to content

Cube string notation #15

Description

@ofikodar

Hello,

I am having difficulty understanding the notation used for the string input. From my interpretation of the documentation, the following code represents the mapping of colors to the faces of a cube:

color_side_mapping = { "red": "R", "white": "U", "orange": "L", "green": "F", "blue": "B", "yellow": "D" }

And this code represents the mapping of the faces to their respective indices in a string:

grid_size = 9
face_indices = dict()
face_indices['U'] = list(range(0, grid_size * 1))
face_indices['L'] = list(range(grid_size * 1 , grid_size * 2))
face_indices['F'] = list(range(grid_size * 2 , grid_size * 3))
face_indices['R'] = list(range(grid_size * 3 , grid_size * 4))
face_indices['B'] = list(range(grid_size * 4 , grid_size * 5))
face_indices['D'] = list(range(grid_size * 5 , grid_size * 6))

Example input: wwwwwwwwwooooooooogggggggggrrrrrrrrrbbbbbbbbbyyyyyyyyy

Any clarification would be greatly appreciated. Thank you.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions