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

parseMovefunction

One move read back from the notation, for a cube of this size, or null where it is not one: R, R', R2, 2R', M2, x'.

Import it

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

Definition

function parseMove(text: string, n: number): CubeMove | null

Parameters

NameTypeDescription
textstring

The text to parse or format.

nnumber

The cube’s side length.

Returns

CubeMove | null

One move read back from the notation, for a cube of this size, or null where it is not one: R, R', R2, 2R', M2, x'.

Examples

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

console.log(parseMove("R'", 3));
{ axis: 0, layer: 2, turns: 1 }

What it prints (run when this page was built)

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