Description Usage Arguments Details Value See Also Examples
Reads cube solving scrambles and solutions for the cube solves website.
1 | read.cubesolve(n, warn = FALSE)
|
n |
A single integer |
warn |
If |
The function reads from the html source of the www.cubesolv.es website, and may fail if the website subsequently changes.
Round brackets immediately followed by any single digit are expanded upon reading, for example (R U)4 becomes R U R U R U R U. All other round brackets are removed. Commutator and conjugate notation is not implemented, so square brackets cannot be used and a warning is given if they are found.
The website does not have automated checking and therefore a typographic error may lead to non-valid moves (or cubes that do not solve). This most commonly occurs when the space between two valid moves is accidentally omitted.
A list containing the scramble, solution and description. The scramble and solution items are character vectors of moves. The description is a character string. If the scramble or solution (or both) is missing, then length zero vectors are returned for these items.
getMovesCube
, invMoves
, is.solved
,
move
1 2 3 4 | ## Not run: cho <- read.cubesolve(4995)
## Not run: aCube <- getMovesCube(cho$scramble)
## Not run: mv <- cho$solution
## Not run: is.solved(move(aCube, mv))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.