リファレンス
ゴーフィッシュ
import { … } from "@johnmorrisdotca/toranpu/go-fish";
最小化と gzip 圧縮をしたサイズは 2.9 kB(読み込むものをすべて含み、esbuild で計測)
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Go Fish: its rules, its computer player and its saved-game format.
エクスポート
| 名前 | 種類 | 概要 |
|---|---|---|
decodeGoFish | 関数 | Text read back into the game of Go Fish it records, by playing every move again through the rules; null for anything they cannot play out. |
encodeGoFish | 関数 | A game of Go Fish as text: its table, its seed and its moves, never a hand. |
GO_FISH_RULES | 定数 | Go Fish as one CardGameRules: everything a table asks of the game. |
goFishComputer | 関数 | The move a computer in the seat to play makes: always one the rules allow. |
GoFishEvent | 型 | What the whole table saw of a turn: who asked whom for what, how many cards were handed over, and — when none were — whether the card drawn from the pond was the rank asked for (which is shown, and earns another ask). |
GoFishGame | 型 | A GAME OF GO FISH: its table and moves (what is kept), and what they make. |
goFishHandSize | 関数 | Seven cards each for two or three players, five for more. |
goFishMemory | 関数 | What the table's log says about every seat's hand, worked out from the asks, the answers and the books. |
GoFishMemory | 型 | What the table has said about each seat's hand: for each seat, the ranks it is known to hold and known to be without. |
GoFishMove | 型 | Asking one player for every card they hold of one rank. |
goFishMoves | 関数 | Every move the seat to play may make now; none once the game is over. |
goFishRanks | 関数 | The ranks the seat to move may ask for: those it holds. |
goFishTargets | 関数 | The players the seat to move may ask: everybody else holding cards, or, when nobody else does, anybody else. |
goFishView | 関数 | The part of the game the seat to play can see, which is all its computer is given. |
GoFishView | 型 | What one seat can see of a game of Go Fish: its own hand, the table, and what has been said and shown. |
goFishWinners | 関数 | The most books wins; level on the most shares it. |
playGoFish | 関数 | The game after that move, with the move added to its record, or null for a move the rules refuse. |
sortGoFish | 関数 | A hand as a player holds it: grouped by rank, ace to king. |
startGoFish | 関数 | A new game of Go Fish for these players (one name a seat) at this size, dealt from the seed dealt, or null for a table Go Fish is not offered for. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。