本文へ移動

Toranpuトランプ

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

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

目次

リファレンス · カード・手札・山札

HandLayoutOptions型

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

How a hand is laid out.

インポート

import type { HandLayoutOptions } from "@johnmorrisdotca/toranpu/element";

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

定義

type HandLayoutOptions = {
    open?: number;
    step?: number;
    turn?: number;
    peek?: number;
};

メンバー

名前型説明
open (省略可)number | undefined

How far open, from 0 (squared up: only the top card shows) to 1 (a clear fan). Unless said, 1.

step (省略可)number | undefined

How far apart neighbours lie when the hand is open, in card widths. Unless said, 0.42.

turn (省略可)number | undefined

How far the cards turn across the whole fan when it is open, in degrees. Unless said, 4 a card, at most 40.

peek (省略可)number | undefined

How much of each card under the top one still shows when the hand is squared up, in card widths. Unless said, 0.04.

例

import type { HandLayoutOptions } from "@johnmorrisdotca/toranpu/element";

const value: HandLayoutOptions = { open: 1, step: 30 };
console.log(value.open);
1

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

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

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