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

runClifunction

The whole command line. args are the arguments after the command's name; the result is the exit code and the text for each stream. Exit code 0 is done, 1 is something asked for that could not be done (turns the cube cannot make, a cube that is not solved under --verify), and 2 is a command that was itself wrong.

Import it

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

Definition

function runCli(args: readonly string[], surroundings?: CliSurroundings): CliResult

Parameters

NameTypeDescription
argsreadonly string[]

Arguments after the command name.

surroundings (optional)CliSurroundings

Host-provided environment, input, locale and random source.

Returns

CliResult

The whole command line. args are the arguments after the command's name; the result is the exit code and the text for each stream. Exit code 0 is done, 1 is something asked for that could not be done (turns the cube cannot make, a cube that is not solved under --verify), and 2 is a command that was itself wrong.

Examples

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

console.log(runCli(["--size", "2", "--verify", "--from", "R", "R'"], { colour: false }));
{ code: 0, out: 'Solved. Moves: 1\n', err: '' }

What it prints (run when this page was built)

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