SpiderTabletype
A game of Spider as it stands: the columns, the cards still to deal, and the runs sent home.
Import it
import type { SpiderTable } from "@johnmorrisdotca/toranpu/spider";
Definition
type SpiderTable = {
tableau: readonly SpiderColumn[];
stock: readonly number[];
done: readonly number[];
};
Members
| Name | Type | Description |
|---|---|---|
tableau | readonly SpiderColumn[] | Ten columns. |
stock | readonly number[] | The cards still to be dealt, ten at a time, in the order they will be dealt. |
done | readonly number[] | The suit of each full run taken off the table, King down to Ace, in the order they were made: eight is a won game. |
Examples
import { dealSpider, spiderDealOfSeed, spiderDeckOf } from "@johnmorrisdotca/toranpu/spider";
import type { SpiderTable } from "@johnmorrisdotca/toranpu/spider";
const table = dealSpider(spiderDeckOf(spiderDealOfSeed(42, 1), 1)!);
const value: SpiderTable = table;
console.log(value.stock.length);50What it prints (run when this page was built)