Skip to the content

Toranpuトランプ

Use a deck, play eleven games with computers, solve a solitaire, or display cards in your own design.

Toranpu is Japanese for playing cards. About the name

Contents

Reference · Spider

solveSpiderfunction

A winning line from this table, or null when none was found within budget tables.

Import it

import { solveSpider } from "@johnmorrisdotca/toranpu/spider";

Definition

function solveSpider(start: SpiderTable, budget?: number): { moves: SpiderMove[] | null; tables: number; }

Parameters

NameTypeDescription
startSpiderTable

The initial game or state before the recorded moves.

budget (optional)number

Limits on the solver’s search work.

Returns

{ moves: SpiderMove[] | null; tables: number; }

A winning line from this table, or null when none was found within budget tables.

Examples

import { dealSpider, solveSpider, spiderDealOfSeed, spiderDeckOf } from "@johnmorrisdotca/toranpu/spider";

const table = dealSpider(spiderDeckOf(spiderDealOfSeed(42, 1), 1)!);
console.log(solveSpider(table, 100));

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/toranpu 2.15.0.