Reference · Cube engine and views
applySolvefunction
A cube after these steps.
Import it
import { applySolve } from "@johnmorrisdotca/kyuubu";
Definition
function applySolve(state: string, n: number, steps: readonly SolveMove[]): string
Parameters
| Name | Type | Description |
|---|---|---|
state | string | The sticker-state string in the package’s face order. |
n | number | The cube’s side length. |
steps | readonly SolveMove[] | The ordered steps of the solve. |
Returns
string
A cube after these steps.
Examples
import { applySolve, parseSolve, solvedCube } from "@johnmorrisdotca/kyuubu";
const reading = parseSolve("R U", 3);
const steps = reading.steps;
const state = solvedCube(3);
console.log(applySolve(state, 3, steps));UUUUUUFFFUBBRRRRRRRRRFFDFFDDDBDDBDDBFFDLLLLLLLLLUBBUBBWhat it prints (run when this page was built)