本文へ移動

Tenka天下

2〜6人で、シードから始まる世界征服ゲームを遊べます。さいころでの戦い、カード、コンピューターの相手、ゲームの保存に対応します。

「天下」は、天の下に広がる世界を表す言葉です。 名前について(英語)

目次

リファレンス · ブラウザーの卓とSVG

TenkaDressing型

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

HOW A TABLE DRAWS ITS DICE AND ITS CARDS, if not the plain way: each is a function that is given what the rules decided and hands back the element to show. A dressing only ever draws. The numbers on the dice, the cards in a hand and the cards left in the deck are the game's, already decided, and a dressing that tumbles a die lands it on the face the game threw, so a game replays move for move whatever it is dressed in. Anything left out is drawn the plain way. tenkaDressing from @johnmorrisdotca/tenka/dressing makes one out of Korokoro's dice and Toranpu's cards.

インポート

import type { TenkaDressing } from "@johnmorrisdotca/tenka/ui";

ほかのエクスポート元: @johnmorrisdotca/tenka/dressing

定義

type TenkaDressing = {
    die?: (face: number, how: TenkaDieHow) => TenkaDrawn;
    card?: (how: TenkaCardHow) => TenkaDrawn;
    back?: (how: TenkaBackHow) => TenkaDrawn;
};

メンバー

名前型説明
die (省略可)((face: number, how: TenkaDieHow) => TenkaDrawn) | undefined

One die of the last throw, showing face (1 to 6).

card (省略可)((how: TenkaCardHow) => TenkaDrawn) | undefined

One card of the hand on the table.

back (省略可)((how: TenkaBackHow) => TenkaDrawn) | undefined

The back of a card: the deck, drawn beside the hand with the number left in it. Nothing is drawn if this is left out.

例

import type { TenkaDressing } from "@johnmorrisdotca/tenka/ui";

const value: TenkaDressing = {back:()=>({element:document.createElement("span")})};
console.log(value);

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

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