Reference
Oh Hell
import { … } from "@johnmorrisdotca/toranpu/oh-hell";
3.2 kB minified and gzipped, with everything it imports (measured with esbuild)
Oh Hell: its rules, its computer player and its saved-game format.
Exports
| Name | Kind | What it is |
|---|---|---|
chooseOhHellBid | function | The bid nearest what the hand is worth, among those allowed. |
dealerOf | function | The seat that deals this deal: the first seat, then round to the left. |
dealPoints | function | What a seat scores for a deal: ten and its bid for exactly what it bid, nothing otherwise. |
dealSizes | function | 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 | function | 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 | function | A game of Oh Hell as text: its table, its seed and its moves, never a hand. |
OH_HELL_MOST_CARDS | constant | The most cards dealt to a hand of Oh Hell: seven. |
OH_HELL_RULES | constant | Oh Hell as one CardGameRules: everything a table asks of the game. |
ohHellBids | function | The bids open to the seat to bid: nought to the cards in hand, less the one a dealer may not make. |
ohHellComputer | function | The move a computer in the seat to play makes: always one the rules allow. |
OhHellDealScore | type | What one finished deal did: each seat's bid, the tricks it took, and what it scored. |
OhHellGame | type | A GAME OF OH HELL: its table and moves (what is kept, KeptCardGame), and everything the moves make. |
ohHellHeight | function | A card's height in a trick: ace high. |
OhHellMove | type | A bid of tricks, nought up to the cards in hand, or one card played to the trick. |
ohHellMoves | function | Every move the seat to play may make now; none once the game is over. |
OhHellPhase | type | Bidding the exact number of tricks each seat will take, playing the deal out, or the game over. |
OhHellPlay | type | One card laid, and whose it was. |
ohHellPlayable | function | The cards the seat to play may lay: the suit led if it holds any. |
ohHellTrickWinner | function | Who takes a trick: the highest trump, or else the highest card of the suit led. |
ohHellView | function | The part of the game the seat to play can see, which is all its computer is given. |
OhHellView | type | A COMPUTER AT THE OH HELL TABLE. |
ohHellWinners | function | The highest score after the last deal: every seat that has it. |
ohHellWorth | function | The tricks a hand should take with these trumps, roughly. |
playOhHell | function | The game after that move, with the move added to its record, or null for a move the rules refuse. |
sortOhHell | function | A hand as a player holds it: by suit, trumps last, high cards to the right. |
startOhHell | function | 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. |