Reference · Boards, rules and challenges
SQUARE_STEPSconstant
Orthogonal direction steps used by square-lattice boards.
Import it
import { SQUARE_STEPS } from "@johnmorrisdotca/tobiishi";
Definition
const SQUARE_STEPS: readonly [readonly [1, 0], readonly [-1, 0], readonly [0, 1], readonly [0, -1]] = [
[1, 0],
[-1, 0],
[0, 1],
[0, -1],
] as const
Examples
import { SQUARE_STEPS } from "@johnmorrisdotca/tobiishi";
console.log(SQUARE_STEPS);[ [ 1, 0 ], [ -1, 0 ], [ 0, 1 ], [ 0, -1 ] ]What it prints (run when this page was built)