Describe the cycles on a scrambled Rubik's Cube
Project description
dlin
Describe piece cycles on a Rubik's Cube.
Installing
To install, run
pip install dlin
Usage: As a Python Package
The dlin.trace
function converts a scramble
(set of moves defined by WCA regulation 12a separated by spaces)
into a python dictionary describing cycles on the cube.
To use, run
from dlin import trace
The following is example code to get the tracing for a scramble.
described_cycles = trace("F' L2 B2 F2 D' F2 D F2 U R2 U' L' B L' R' F2 R2 B2 U2 Fw'")
Here is an example of what could be contained in described_cycles
{
"edge": [
{
"type": "cycle",
"buffer": "UF",
"targets": ["LD", "LF", "RU", "LU"],
"orientation": 0,
"parity": 0,
},
{
"type": "cycle",
"buffer": "UB",
"targets": ["RB", "DR"],
"orientation": 1,
"parity": 0,
},
{
"type": "cycle",
"buffer": "FR",
"targets": ["DB", "DF"],
"orientation": 1,
"parity": 0,
},
],
"corner": [
{
"type": "cycle",
"buffer": "UFR",
"targets": ["UBL", "RUB", "RDB", "FDR", "UFL", "FDL"],
"orientation": 1,
"parity": 0,
},
{
"type": "misoriented",
"buffer": "DBL",
"targets": [],
"orientation": -1,
"parity": 0,
},
],
"scramble": "F' L2 B2 F2 D' F2 D F2 U R2 U' L' B L' R' F2 R2 B2 U2 Fw'",
"rotation": ["z"],
}
Usage: Command Line Script
Run
dlin-trace [scramble]
Make sure to surround the scramble in quotation marks. This will output a json, with similar structure to the dictionary shown above.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dlin-0.1.1.tar.gz
.
File metadata
- Download URL: dlin-0.1.1.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a990b9a1342c956a491c9d59abb83b3be8f6fc6802ea4529798e0b2a9166be72 |
|
MD5 | 634ef3623be852e06f3b1ae0e8aab52b |
|
BLAKE2b-256 | 6ba12388457d4b7ca4ba70df45ab46fc2ef96cedecd0e8ffd7e295def302943f |
File details
Details for the file dlin-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: dlin-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bef67a2f0847794e9fb4ad1ad86b5e7236f78c528ddbff590aec1c7c939ffda |
|
MD5 | ae9848193546e98b8a3380700b4f601b |
|
BLAKE2b-256 | a540e7c4e0e77ab96e441f01d1ec3bd8f3f39fd8935a7fdf85083a98e41e40ab |