本文へ移動

Toranpuトランプ

デッキを使い、11種類のゲームでコンピューターと対戦し、ソリティアを解いたり、独自の絵柄でカードを表示したりできます。

「トランプ」は、日本語で playing cards を指す言葉です。 名前について(英語)

目次

リファレンス · ビッグツー

ClimbTrick型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

The part of a climbing game's state the trick machinery moves: every climbing game carries these.

インポート

import type { ClimbTrick } from "@johnmorrisdotca/toranpu/big-two";

ほかのエクスポート元: @johnmorrisdotca/toranpu/president

定義

type ClimbTrick = {
    hands: CardId[][];
    pile: ClimbPlay | null;
    passed: boolean[];
    toPlay: number | null;
    played: CardId[];
};

メンバー

名前型説明
handsstring[][]
pileClimbPlay | null

The cards to beat, or null when the seat to play leads.

passedboolean[]

Who has passed on this trick: they wait until it is cleared.

toPlaynumber | null

Whose move it is; null once the game is over.

playedstring[]

Every card played this deal, in order: what the whole table has seen.

例

import type { ClimbTrick } from "@johnmorrisdotca/toranpu/big-two";
import { newGame } from "@johnmorrisdotca/toranpu";

const value: ClimbTrick = newGame("bigTwo", { players: ["Aki", "Ben", "Cy", "Dev"], seed: 42 })!;
console.log(value.hands.map((hand) => hand.length));
[ 13, 13, 13, 13 ]

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/toranpu 2.15.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。