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

moveFitsfunction

Whether a move can be made on a cube of this size.

Import it

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

Definition

function moveFits(n: number, move: CubeMove): boolean

Parameters

NameTypeDescription
nnumber

The cube’s side length.

moveCubeMove

The turn to apply, name or invert.

Returns

boolean

Whether a move can be made on a cube of this size.

Examples

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

const move = parseMove("R", 3)!;
console.log(moveFits(3, move));
true

What it prints (run when this page was built)

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