Reference · Boards, rules and challenges
TRIANGLE_STEPSconstant
Six jump directions used by the triangular lattice.
Import it
import { TRIANGLE_STEPS } from "@johnmorrisdotca/tobiishi";
Definition
const TRIANGLE_STEPS: readonly [readonly [1, 0], readonly [-1, 0], readonly [0, 1], readonly [0, -1], readonly [1, 1], readonly [-1, -1]] = [...SQUARE_STEPS, [1, 1], [-1, -1]] as const
Examples
import { TRIANGLE_STEPS } from "@johnmorrisdotca/tobiishi";
console.log(TRIANGLE_STEPS);[ [ 1, 0 ], [ -1, 0 ], [ 0, 1 ], [ 0, -1 ], [ 1, 1 ], [ -1, -1 ] ]What it prints (run when this page was built)