CuboidKeyReadingtype
What a key means on a cuboid: a turn, a depth for the next face letter, or nothing.
Import it
import type { CuboidKeyReading } from "@johnmorrisdotca/kyuubu/cuboid";
Definition
type CuboidKeyReading = {
move: CuboidMove;
} | {
depth: number;
} | null;
Examples
import type { CuboidKeyReading } from "@johnmorrisdotca/kyuubu/cuboid";
import { readCuboidKey } from "@johnmorrisdotca/kyuubu/cuboid";
const value: CuboidKeyReading = readCuboidKey("u", false, [2, 3, 3], 1);
console.log(value);{ move: { axis: 1, layer: 2, turns: 2 } }What it prints (run when this page was built)