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

joinTurnsfunction

Turns of one layer in a row written as one, and any that come to nothing left out: "U' U2" is "U", "U' U" is nothing.

Import it

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

Definition

function joinTurns(moves: readonly CubeMove[]): CubeMove[]

Parameters

NameTypeDescription
movesreadonly CubeMove[]

The turns, in their execution order.

Returns

CubeMove[]

Turns of one layer in a row written as one, and any that come to nothing left out: "U' U2" is "U", "U' U" is nothing.

Examples

import { joinTurns, movesNotation, parseMove, undoOf } from "@johnmorrisdotca/kyuubu";

const move = parseMove("R", 3)!;
console.log(movesNotation(joinTurns([move, undoOf(move)]), 3));

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