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.2.tar.gz
.
File metadata
- Download URL: dlin-0.1.2.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3635d4176226aa8648b9ba10ae35acba8768527a436b22cad5757267b2724197 |
|
MD5 | 12657f5634ba9b0ac7f873f38bb67103 |
|
BLAKE2b-256 | 76812008777f1bbdb4946ccf2e4f8983bbc4244077757923c25771668ff86396 |
File details
Details for the file dlin-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: dlin-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.1 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 | 9884242ec48e1d64da73aded6f505dd148ae4c69e67cf9d9705a69d3514c3eb2 |
|
MD5 | d6302e206eb49db648c03523515f6f0e |
|
BLAKE2b-256 | 17c06acfa9bb0c77679a9406ae20f530ab5c28e86fcfd1af98eed8cb84e132fb |