リファレンス
ユーカー
import { … } from "@johnmorrisdotca/toranpu/euchre";
最小化と gzip 圧縮をしたサイズは 3.8 kB(読み込むものをすべて含み、esbuild で計測)
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Euchre: its rules, its computer player and its saved-game format.
エクスポート
| 名前 | 種類 | 概要 |
|---|---|---|
dealerOf | 関数 | The seat that deals this hand: the first seat, then round to the left. |
decodeEuchre | 関数 | Text read back into the game of Euchre it records, by playing every move again through the rules; null for anything they cannot play out. |
encodeEuchre | 関数 | A game of Euchre as text: its table, its seed and its moves, never a hand. |
EUCHRE_DECK | 定数 | The cards Euchre is played with: nine to ace of each suit. |
EUCHRE_RULES | 定数 | Euchre as one CardGameRules: everything a table asks of the game. |
EUCHRE_SEATS | 定数 | How many play Euchre: four, in two partnerships. |
euchreComputer | 関数 | The move a computer in the seat to play makes: always one the rules allow. |
EuchreGame | 型 | A GAME OF EUCHRE: its table and moves (what is kept, KeptCardGame), and everything the moves make. |
EuchreHandScore | 型 | What one hand did: which partnership made trumps, the tricks it took, and the points each partnership scored. |
euchreHeight | 関数 | A card's height within its suit as the hand is played: ace high; in trumps the right bower, then the left, above everything. |
EuchreMove | 型 | Ordering up the card turned up, or passing; naming another suit, or passing; the dealer throwing a card after picking the turned one up; or a card played to the trick. |
euchreMoves | 関数 | Every move the seat to play may make now; none once the game is over. |
EuchrePhase | 型 | The first round of the making (take the turned card's suit, or pass), the second (name another suit, or pass — the dealer may not), the dealer's discard, the tricks, or the game over. |
EuchrePlay | 型 | One card laid, and whose it was. |
euchrePlayable | 関数 | The cards the seat to play may lay on the trick: the suit led (the left bower counting as a trump) if it holds any. |
euchreTrickWinner | 関数 | Who is taking a trick: the highest trump, or else the highest card of the suit led. |
euchreView | 関数 | The part of the game the seat to play can see, which is all its computer is given. |
EuchreView | 型 | A COMPUTER AT THE EUCHRE TABLE. |
euchreWinners | 関数 | The partnership with the higher score wins, both its seats. |
handPoints | 関数 | What a hand scores: one to the makers for three or four tricks, two for all five, and two to the other side when the makers take two or fewer. |
partnerOf | 関数 | The seat across the table. |
playEuchre | 関数 | The game after that move, with the move added to its record, or null for a move the rules refuse. |
sameColour | 関数 | The suit of the same colour: clubs and spades, diamonds and hearts. |
sortEuchre | 関数 | A hand sorted as a player holds it: by suit (trumps last once made), high cards to the right. |
startEuchre | 関数 | A new game of Euchre for these players (one name a seat) at this size, dealt from the seed dealt, or null for a table Euchre is not offered for. |
suitIn | 関数 | The suit a card belongs to once trumps are made: the left bower is a trump. |
teamOf | 関数 | A seat's partnership: 0 for seats 0 and 2, 1 for seats 1 and 3. |
throwAway | 関数 | After picking the turned card up: the lowest card outside trumps, from the shortest suit, never an ace. |
trumpWorth | 関数 | How much a hand is worth with this suit as trumps, roughly in tricks. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。