DIRECTIONS定数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The four line orientations through a point. Each is checked in both its forward and reverse sense, so four entries cover all eight neighbours.
インポート
import { DIRECTIONS } from "@johnmorrisdotca/narabe";
定義
const DIRECTIONS: readonly Point[] = [
{ row: 0, col: 1 },
{ row: 1, col: 0 },
{ row: 1, col: 1 },
{ row: 1, col: -1 },
]
例
import { DIRECTIONS } from "@johnmorrisdotca/narabe";
console.log(DIRECTIONS);[
{ row: 0, col: 1 },
{ row: 1, col: 0 },
{ row: 1, col: 1 },
{ row: 1, col: -1 }
]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。