makeOrthogonalBoard関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Deals a board whose clues count only up, down, left and right.
インポート
import { makeOrthogonalBoard } from "@johnmorrisdotca/jirai/orthogonal";
ほかのエクスポート元: @johnmorrisdotca/jirai
定義
function makeOrthogonalBoard(settings: OrthogonalSettings, first: number, options?: GenerationOptions): Board
引数
| 名前 | 型 | 説明 |
|---|---|---|
settings | OrthogonalSettings | The validated native field dimensions, mine count, topology, shape, opening, generation policy and numeric seed. |
first | number | The native active-cell index of the opening, from which generation and proof begin. |
options (省略可) | GenerationOptions | undefined | The generation budgets/options, or React-owned native settings and host callbacks specified by this signature. |
戻り値
Board
Deals a board whose clues count only up, down, left and right.
例
import type { Settings } from "@johnmorrisdotca/jirai";
import type { OrthogonalSettings } from "@johnmorrisdotca/jirai/orthogonal";
import { makeOrthogonalBoard } from "@johnmorrisdotca/jirai/orthogonal";
const settings: Settings={width:3,height:3,mines:1,grid:"square",noGuess:false,opening:"clear",seed:42};
const orthogonalSettings: OrthogonalSettings={width:3,height:3,mines:1,noGuess:false,opening:"clear",seed:42};
console.log(makeOrthogonalBoard(orthogonalSettings,0,{attempts:1,repair:false}).settings.grid);orthogonal出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。