CuboidMovetype
One turn of a layer: its axis, its layer from the axis's negative side (0 to the axis's depth − 1), and one, two or three quarter turns by the right-hand rule. A two is a half turn, the only turn of a layer whose slice is not square.
Import it
import type { CuboidMove } from "@johnmorrisdotca/kyuubu/cuboid";
Definition
type CuboidMove = {
axis: CubeAxis;
layer: number;
turns: CubeTurns;
};
Members
| Name | Type | Description |
|---|---|---|
axis | CubeAxis | |
layer | number | |
turns | CubeTurns |
Examples
import type { CuboidMove } from "@johnmorrisdotca/kyuubu/cuboid";
import { parseCuboidMove } from "@johnmorrisdotca/kyuubu/cuboid";
const value: CuboidMove = parseCuboidMove("R", [2, 3, 3])!;
console.log(value);{ axis: 0, layer: 1, turns: 3 }What it prints (run when this page was built)