solveSpider関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A winning line from this table, or null when none was found within budget tables.
インポート
import { solveSpider } from "@johnmorrisdotca/toranpu/spider";
定義
function solveSpider(start: SpiderTable, budget?: number): { moves: SpiderMove[] | null; tables: number; }
引数
| 名前 | 型 | 説明 |
|---|---|---|
start | SpiderTable | The initial game or state before the recorded moves. |
budget (省略可) | number | Limits on the solver’s search work. |
戻り値
{ moves: SpiderMove[] | null; tables: number; }
A winning line from this table, or null when none was found within budget tables.
例
import { dealSpider, solveSpider, spiderDealOfSeed, spiderDeckOf } from "@johnmorrisdotca/toranpu/spider";
const table = dealSpider(spiderDeckOf(spiderDealOfSeed(42, 1), 1)!);
console.log(solveSpider(table, 100));この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。