Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cube string notation #15

Open
ofikodar opened this issue Feb 9, 2023 · 0 comments
Open

Cube string notation #15

ofikodar opened this issue Feb 9, 2023 · 0 comments

Comments

@ofikodar
Copy link

ofikodar commented Feb 9, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant