cuboidSolvedfunction
SOLVED: every face one colour, whichever colour it is, so a cuboid solved and then turned whole in the hand is still solved. One pass over the stickers.
Import it
import { cuboidSolved } from "@johnmorrisdotca/kyuubu/cuboid";
Definition
function cuboidSolved(state: string, dims: CuboidDims): boolean
Parameters
| Name | Type | Description |
|---|---|---|
state | string | The sticker-state string in the package’s face order. |
dims | CuboidDims | The cuboid’s x, y and z dimensions, in that order. |
Returns
boolean
SOLVED: every face one colour, whichever colour it is, so a cuboid solved and then turned whole in the hand is still solved. One pass over the stickers.
Examples
import { cuboidSolved, solvedCuboid } from "@johnmorrisdotca/kyuubu/cuboid";
const dims = [2, 3, 3] as const;
console.log(cuboidSolved(solvedCuboid(dims), dims));trueWhat it prints (run when this page was built)