cuboidScrambleLengthfunction
How many turns a random walk that scrambles a cuboid has: 8, and 2.2 for every layer that is not the whole puzzle, up to 100. Near the 25 of a 3×3 for a puzzle with as many layers.
Import it
import { cuboidScrambleLength } from "@johnmorrisdotca/kyuubu/cuboid";
Definition
function cuboidScrambleLength(dims: CuboidDims): number
Parameters
| Name | Type | Description |
|---|---|---|
dims | CuboidDims | The cuboid’s x, y and z dimensions, in that order. |
Returns
number
How many turns a random walk that scrambles a cuboid has: 8, and 2.2 for every layer that is not the whole puzzle, up to 100. Near the 25 of a 3×3 for a puzzle with as many layers.
Examples
import { cuboidScrambleLength } from "@johnmorrisdotca/kyuubu/cuboid";
const dims = [2, 3, 3] as const;
console.log(cuboidScrambleLength(dims));26What it prints (run when this page was built)