本文へ移動

Toranpuトランプ

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

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

目次

リファレンス

オーヘル

import { … } from "@johnmorrisdotca/toranpu/oh-hell";

最小化と gzip 圧縮をしたサイズは 3.2 kB(読み込むものをすべて含み、esbuild で計測)

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

Oh Hell: its rules, its computer player and its saved-game format.

エクスポート

名前種類概要
chooseOhHellBid関数The bid nearest what the hand is worth, among those allowed.
dealerOf関数The seat that deals this deal: the first seat, then round to the left.
dealPoints関数What a seat scores for a deal: ten and its bid for exactly what it bid, nothing otherwise.
dealSizes関数The cards dealt to each seat in each deal of a game of this length: up to seven, and back down in the long game.
decodeOhHell関数Text read back into the game of Oh Hell it records, by playing every move again through the rules; null for anything they cannot play out.
encodeOhHell関数A game of Oh Hell as text: its table, its seed and its moves, never a hand.
OH_HELL_MOST_CARDS定数The most cards dealt to a hand of Oh Hell: seven.
OH_HELL_RULES定数Oh Hell as one CardGameRules: everything a table asks of the game.
ohHellBids関数The bids open to the seat to bid: nought to the cards in hand, less the one a dealer may not make.
ohHellComputer関数The move a computer in the seat to play makes: always one the rules allow.
OhHellDealScore型What one finished deal did: each seat's bid, the tricks it took, and what it scored.
OhHellGame型A GAME OF OH HELL: its table and moves (what is kept, KeptCardGame), and everything the moves make.
ohHellHeight関数A card's height in a trick: ace high.
OhHellMove型A bid of tricks, nought up to the cards in hand, or one card played to the trick.
ohHellMoves関数Every move the seat to play may make now; none once the game is over.
OhHellPhase型Bidding the exact number of tricks each seat will take, playing the deal out, or the game over.
OhHellPlay型One card laid, and whose it was.
ohHellPlayable関数The cards the seat to play may lay: the suit led if it holds any.
ohHellTrickWinner関数Who takes a trick: the highest trump, or else the highest card of the suit led.
ohHellView関数The part of the game the seat to play can see, which is all its computer is given.
OhHellView型A COMPUTER AT THE OH HELL TABLE.
ohHellWinners関数The highest score after the last deal: every seat that has it.
ohHellWorth関数The tricks a hand should take with these trumps, roughly.
playOhHell関数The game after that move, with the move added to its record, or null for a move the rules refuse.
sortOhHell関数A hand as a player holds it: by suit, trumps last, high cards to the right.
startOhHell関数A new game of Oh Hell for these players (one name a seat) at this size, dealt from the seed dealt, or null for a table Oh Hell is not offered for.

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

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