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.
Release files for dlin 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dlin-0.1.2.tar.gz | 6.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dlin-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.2 kB
Release files / dlin-0.1.2.tar.gz
| Download URL | dlin-0.1.2.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3635d4176226aa8648b9ba10ae35acba8768527a436b22cad5757267b2724197
|
|
BLAKE2b-256 checksum How to use checksums |
76812008777f1bbdb4946ccf2e4f8983bbc4244077757923c25771668ff86396
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.9
|
Release files / dlin-0.1.2-py3-none-any.whl
| Download URL | dlin-0.1.2-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9884242ec48e1d64da73aded6f505dd148ae4c69e67cf9d9705a69d3514c3eb2
|
|
BLAKE2b-256 checksum How to use checksums |
17c06acfa9bb0c77679a9406ae20f530ab5c28e86fcfd1af98eed8cb84e132fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.9
|