Skip to the content

Kyuubuキューブ

Turn CSS 3D cubes by touch, keys or notation, reproduce a scramble from a seed, and follow a solve one named step at a time.

Kyuubu (キューブ) is the Japanese spelling of cube. About the name

Contents

Reference · Cube engine and views

parseSolveMovefunction

One written step read for a cube of this size, or why it is not one.

Import it

import { parseSolveMove } from "@johnmorrisdotca/kyuubu";

Definition

function parseSolveMove(token: string, n: number): Omit<SolveMove, "at"> | "unknown" | "no-such-layer"

Parameters

NameTypeDescription
tokenstring

The notation token being read or described.

nnumber

The cube’s side length.

Returns

"unknown" | "no-such-layer" | Omit<SolveMove, "at">

One written step read for a cube of this size, or why it is not one.

Examples

import { parseSolveMove } from "@johnmorrisdotca/kyuubu";

console.log(parseSolveMove("Rw", 3));
{
  text: 'Rw',
  moves: [ { axis: 0, layer: 2, turns: 3 }, { axis: 0, layer: 1, turns: 3 } ],
  counts: true
}

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kyuubu 1.14.1.