本文へ移動

Toranpuトランプ

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

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

目次

リファレンス · ゲームと状態

CardGameKind型

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

THE CARD GAMES, and the tables each offers. A card game's "size" is how long the game lasts, in its own terms:

  • Hearts, three or four: the score that ends it, 50 or 100 (the usual game).
  • Big Two, two to four: how many deals, 1, 3 or 5, the fewest points winning.
  • President, three to eight: how many rounds, 3, 5 or 7, the most points winning.
  • Go Fish, two to six: one deal, played until every book is down.
  • Crazy Eights, two to seven: the score that wins, 50, 100 or 200.
  • Spades, four in two partnerships: the score that wins, 200, 300 or 500.
  • Gin Rummy, two: the score that wins, 50, 100 or 150.
  • Euchre, four in two partnerships: the score that wins, 5 or 10.
  • Cribbage, for two: the score that wins, 61 (once round the board) or 121.
  • Oh Hell, three or four each for themselves: how many deals, 7 (one card up to seven) or 13 (and back down).
  • War, for two: how many turns of the cards it may last, 25, 50, 100, 200 or 1000, the most cards winning when they run out.

Every seat may be a person's or a computer's, so a table of one person and three computers is a game of Hearts as much as four people round a phone.

インポート

import type { CardGameKind } from "@johnmorrisdotca/toranpu";

定義

type CardGameKind = "hearts" | "bigTwo" | "president" | "goFish" | "crazyEights" | "spades" | "ginRummy" | "euchre" | "cribbage" | "ohHell" | "war";

例

import type { CardGameKind } from "@johnmorrisdotca/toranpu";

const value: CardGameKind = "hearts";
console.log(value);
hearts

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

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

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