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 · Cuboid engine

cuboidMovesNotationfunction

Moves as a person writes them, a space between each.

Import it

import { cuboidMovesNotation } from "@johnmorrisdotca/kyuubu/cuboid";

Definition

function cuboidMovesNotation(moves: readonly CuboidMove[], dims: CuboidDims): string

Parameters

NameTypeDescription
movesreadonly CuboidMove[]

The turns, in their execution order.

dimsCuboidDims

The cuboid’s x, y and z dimensions, in that order.

Returns

string

Moves as a person writes them, a space between each.

Examples

import { cuboidMovesNotation, parseCuboidMove } from "@johnmorrisdotca/kyuubu/cuboid";

const dims = [2, 3, 3] as const;
const cmove = parseCuboidMove("R", dims)!;
console.log(cuboidMovesNotation([cmove], dims));
R

What it prints (run when this page was built)

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