Arrow型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One arrow: its cells from tail to head (indexes into the board, row by row), and the way its head points.
インポート
import type { Arrow } from "@johnmorrisdotca/meikyuu";
定義
type Arrow = {
readonly cells: readonly number[];
readonly dir: ArrowDirection;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
cells | readonly number[] | |
dir | ArrowDirection |
例
import type { Arrow, ArrowRecipe } from "@johnmorrisdotca/meikyuu";
import { makeArrows } from "@johnmorrisdotca/meikyuu";
const arrowRecipe: ArrowRecipe = {shape:"square",w:5,h:5,longest:3,seed:42};
const arrows = makeArrows(arrowRecipe);
const value: Arrow = arrows.arrows[0];
console.log(value);{ cells: [ 13, 18, 19 ], dir: 1 }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。