GeneratorOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
How a board's lines are grown and how it is proved, every part with a default, and the twists to plant on it.
インポート
import type { GeneratorOptions } from "@johnmorrisdotca/tsunagi";
定義
type GeneratorOptions = {
longest?: number;
most?: number;
budget?: number;
mends?: number;
tries?: number;
warps?: number;
bridges?: number;
waypoints?: number;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
longest (省略可) | number | undefined | The longest a line may grow, in cells. Default three times the board's longer side. |
most (省略可) | number | undefined | The most lines the board may end with, else this path is dropped for another. |
budget (省略可) | number | undefined | What one proof may spend before this path is dropped, so that a hard board costs a retry and not a long wait: 20,000 positions to 12×12, and from 13×13, on a honeycomb and with warps 3,000 dead ends. |
mends (省略可) | number | undefined | How many times a board with two answers is mended before this path is dropped. Default 60. |
tries (省略可) | number | undefined | How many paths are tried before the generator says it found nothing. Default 30. |
warps (省略可) | number | undefined | How many marked warps (portals) to plant. Not on a honeycomb. |
bridges (省略可) | number | undefined | How many bridges to plant. Not on a honeycomb, nor with warps. |
waypoints (省略可) | number | undefined | How many waypoints to plant. |
例
import type { GeneratorOptions } from "@johnmorrisdotca/tsunagi";
const value: GeneratorOptions = {longest:30,budget:2000,warps:1};
console.log(value);{ longest: 30, budget: 2000, warps: 1 }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。