SpiderTable型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A game of Spider as it stands: the columns, the cards still to deal, and the runs sent home.
インポート
import type { SpiderTable } from "@johnmorrisdotca/toranpu/spider";
定義
type SpiderTable = {
tableau: readonly SpiderColumn[];
stock: readonly number[];
done: readonly number[];
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
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. |
例
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);50出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。