CuboidLineReadingtype
What reading a line gives: its moves, or the first piece that is not one, where it began (counted in characters from 0) and why.
Import it
import type { CuboidLineReading } from "@johnmorrisdotca/kyuubu/cuboid";
Definition
type CuboidLineReading = {
ok: true;
moves: CuboidMove[];
} | {
ok: false;
token: string;
at: number;
fault: CuboidFault;
};
Examples
import type { CuboidLineReading } from "@johnmorrisdotca/kyuubu/cuboid";
import { readCuboidMoves } from "@johnmorrisdotca/kyuubu/cuboid";
const value: CuboidLineReading = readCuboidMoves("R U2", [2, 3, 3]);
console.log(value.ok);trueWhat it prints (run when this page was built)