Reference · Cube engine and views
countSolveMovesfunction
How many of the steps count as moves: every turn, and no turn of the whole cube.
Import it
import { countSolveMoves } from "@johnmorrisdotca/kyuubu";
Definition
function countSolveMoves(steps: readonly SolveMove[]): number
Parameters
| Name | Type | Description |
|---|---|---|
steps | readonly SolveMove[] | The ordered steps of the solve. |
Returns
number
How many of the steps count as moves: every turn, and no turn of the whole cube.
Examples
import { countSolveMoves, parseSolve } from "@johnmorrisdotca/kyuubu";
const reading = parseSolve("R U", 3);
const steps = reading.steps;
console.log(countSolveMoves(steps));2What it prints (run when this page was built)