HitotsuCardDrawingfunction
One card's drawing, to go inside any SVG whose box is 100 by 140: a face, or the back for null.
Every export of every entry point, each with its own page. This page keeps the addresses the old one-page reference had.
@johnmorrisdotca/hitotsu/reactHitotsuCardDrawingfunctionOne card's drawing, to go inside any SVG whose box is 100 by 140: a face, or the back for null.
HitotsuCardImagefunctionA card as a whole SVG, sized by its parent or its own width: <HitotsuCardImage card="R70" width={80} />.
HitotsuTablefunctionA whole table, you against computers, as a React component: <HitotsuTable rules={HITOTSU_PARTY} players={["You", "Aki", "Ben"]} />.
HitotsuTablePropstypeNative table settings and div attributes for the React component, with an optional onReady callback.
@johnmorrisdotca/hitotsu/elementdefineHitotsuTablefunctionRegister a default or custom-tag native table; safe on servers and idempotent.
defineTablefunctionStandard table registration helper.
HITOTSU_EMBED_OPTION_KEYSconstantNative option keys checked by the builder.
HitotsuElementOptionstypeHost-only settings, including custom house rules and private names.
HitotsuTableElementclassA native playable colour-card table with reflected settings.
@johnmorrisdotca/hitotsu/element/definedefineHitotsuTablefunctionRegister a default or custom-tag native table; safe on servers and idempotent.
defineTablefunctionStandard table registration helper.
HITOTSU_EMBED_OPTION_KEYSconstantNative option keys checked by the builder.
HitotsuElementOptionstypeHost-only settings, including custom house rules and private names.
HitotsuTableElementclassA native playable colour-card table with reflected settings.
@johnmorrisdotca/hitotsu/element-definedefineHitotsuTablefunctionRegister a default or custom-tag native table; safe on servers and idempotent.
defineTablefunctionStandard table registration helper.
HITOTSU_EMBED_OPTION_KEYSconstantNative option keys checked by the builder.
HitotsuElementOptionstypeHost-only settings, including custom house rules and private names.
HitotsuTableElementclassA native playable colour-card table with reflected settings.
@johnmorrisdotca/hitotsu/card-soundsCARD_SOUND_KINDSconstantEvery kind of sound, in the order a game meets them.
CardSoundDatatypeThe recordings, by name (deal-2), as base64 AAC.
CardSoundKindtypeOne kind of sound: deal a card sent to a hand, flip a card turned over, play a card laid on the table, shuffle the deck shuffled.
CardSoundstypeA table's sounds: play one, mute and unmute, change the volume, close when the table goes.
CardSoundsOptionstypeHow a table's sounds are made.
CardSoundWindowtypeThe parts of a window the sounds use: an audio context and atob.
createCardSoundsfunctionA table's card sounds.
MOST_SOUNDS_AT_ONCEconstantAs many sounds as one call plays: thirteen cards dealt are eight slides, not a wall of noise.
PlayCardSoundOptionstypeHow one sound is played.
soundTimesfunctionWhen each of count sounds starts, in milliseconds from the first: one every gap, and no more than MOST_SOUNDS_AT_ONCE, spread over the same time.
@johnmorrisdotca/hitotsucallMattersfunctionWhether the call is a choice now: this seat is about to play its second-last card.
cardOfMovefunctionThe card a card move puts down.
ClothtypeA cloth's name.
clothVarsfunctionA cloth as CSS variables; nothing for a name that is not a cloth, so the defaults stay.
colourOffunctionA card's colour, or null for a wild.
colourWordsfunctionA colour’s name in English or Japanese.
decodeHitotsufunctionRead a saved setup and replay every logged move through the native rules; null for an unreadable, unsupported or illegal saved game.
DRAW_TWOconstantThe face code for a Draw Two card.
encodeHitotsufunctionSave the setup, seed and ordered move log as JSON text; hands and piles are reconstructed when decoded.
faceOffunctionA card's face: a digit, or S, R, D, W, F.
freshSeedfunctionA fresh seed for a new deal.
handOffunctionA seat's hand; an empty one for a seat the table does not have.
HITOTSU_ALL_WILD_DECKconstantThe cards of the all-wild deck: 112 wilds, none of them with a colour: 32 plain, 24 each of Skip and Reverse, 20 Draw Two and 12 Wild Draw Four.
HITOTSU_CARD_BOXconstantThe card's width and height in the design's units.
HITOTSU_CAUGHTconstantCards taken for going down to one without calling it, and for a Wild Draw Four challenged and found honest.
HITOTSU_CHALLENGE_LOSTconstantCards drawn when a Wild Draw Four challenge fails: six.
HITOTSU_CLASSICconstantThe published rules: no stacking, no jumping in, sevens and zeros as plain numbers, one card drawn, a Wild Draw Four that may be challenged, seven cards dealt.
HITOTSU_CLOTHSconstantTHE CLOTHS A TABLE MAY BE LAID IN: the same five the whole family offers, and itsutsu.com's boards: green, blue, red, black and wood.
HITOTSU_COLOUR_LOOKconstantEach colour's fill, the ink written on it, its element and its name; W is the wilds' and the back's.
HITOTSU_COLOURSconstantThe four colours in the order a hand sorts them and a picker offers them.
HITOTSU_DECKconstantEvery card, in the deck's own order.
HITOTSU_DECK_SIZEconstantThe cards in the deck: 25 in each colour and eight wilds.
HITOTSU_DEFAULT_SIZEconstantThe default match target, 500 points.
HITOTSU_FACE_MARKconstantWhat each face shows in the middle of a card and in its corners; a number shows itself.
HITOTSU_MODESconstantThe modes a table can be set up with, the classic deck first.
HITOTSU_MOST_PLAYERSconstantThe most at a table: eight, which one deck of 108 deals seven each and leaves a stock to draw from.
HITOTSU_ONE_HANDconstantHOW LONG A GAME OF HITOTSU LASTS, its "size": to 200 or 500 points, or a single hand (1), the party table's game.
HITOTSU_PAPERconstantThe card's paper, round every card and under the diamond.
HITOTSU_PARTYconstantPARTY MODE: the house rules a big table plays by, and a short game — five cards each, one hand, draw cards stacking on any draw card, jumping in, and sevens and zeros moving hands round.
HITOTSU_POINTSconstantWhat a card left in a hand is worth to the player who went out: its number, twenty an action card, fifty a wild.
HITOTSU_SIZESconstantSupported match lengths: one hand, 200 points or 500 points.
HITOTSU_STRINGSconstantNative interface, settings and words for host code.
HITOTSU_STRINGS_JAconstantThe table's words in Japanese.
HitotsuCardtypeA card by its short name: its colour letter (W for a wild), its face — a digit, S skip, R reverse, D draw two, W wild, F wild draw four — and which copy of that card it is, so the two red fives are R50 and R51.
HitotsuCardMovetypeA move that puts a card down: in turn, or jumping in.
hitotsuCardShapesfunctionThe shapes of one card, in drawing order: a face, or the back for null.
hitotsuCardSvgfunctionA whole card as an SVG document, width pixels wide (140/100 of it tall): a face, or the back for null.
HitotsuChallengetypeA Wild Draw Four the player to move may challenge: who played it, and whether they held a card of the colour it was played on.
HitotsuColourtypeA card's colour: red, yellow, green or blue.
hitotsuComputerfunctionChoose a move for the current player from the legal choices.
hitotsuComputerJumpfunctionA computer's card played out of turn, where the table jumps in: the first computer seat round from the player to move that holds a card identical to the top one.
HitotsuGametypeA GAME OF HITOTSU: its table and moves (what is kept), and the hand they have reached.
HitotsuHandletypeNative game access, redealing and presentation updates.
hitotsuJumpInsfunctionJUMPING IN: with the option on, any other player holding a card identical to the one on top — same colour, same face, never a wild — may play it out of turn, and play goes on from them.
HitotsuLanguagetypeThe languages the table speaks: English, and Japanese ("ja").
hitotsuLanguageOffunctionThe language a language tag such as "ja", "ja-JP" or "en-GB" asks for: Japanese for any ja, English for everything else, and for nothing.
hitotsuLaunchfunctionHow many cards the launcher fires, from the seed and how many moves have been made: the same for the same game, never the same twice in a row.
hitotsuMatchesfunctionWhether a card may go on the pile on an ordinary turn: a wild always; otherwise the colour to follow, or the top card's face.
HitotsuModetypeWhich deck and which kind of drawing a table plays with: the classic game, a deck of wilds only (all-wild), or a launcher that fires a random number of cards in place of a draw pile (launcher).
HitotsuMovetypeOne move: a card played, a draw, a turn passed, a pending draw taken, a Wild Draw Four challenged, or a card played out of turn.
hitotsuMovesfunctionEvery move the player to move may make now; none once the game is over.
HitotsuNewstypeSomething that happened in the last move, for the table to say: nothing a player could not have seen.
hitotsuOpeningColourfunctionThe colour an all-wild hand opens on, from the seed: there is no coloured card to start it.
HitotsuOptionstypeHow the house plays: each popular variant, as a choice at the set-up.
hitotsuPlayablefunctionThe cards the player to move may play now: on a draw, what stacks; after drawing, the card drawn if it goes.
hitotsuPointsfunctionWhat a card left in hand is worth to the player who went out.
HitotsuResulttypeHow a hand ended: who won it and what they scored, or who held least when nobody could go on.
HitotsuShapetypeOne shape of the design.
hitotsuShapeSvgfunctionOne shape as SVG markup.
hitotsuStringsfunctionThe table's words in a language: HITOTSU_STRINGS for "en", HITOTSU_STRINGS_JA for "ja".
HitotsuStringstypeEvery table word, including embed errors; hosts may override them with strings.
HitotsuTableOptionstypeNative table settings, including private player names and callbacks.
HitotsuTableSetUptypeWhat a set-up sends beyond a length and the seats: the seed it was dealt from, and the house rules.
hitotsuTopfunctionThe top card of the discard pile.
hitotsuViewfunctionOne seat’s hand and legal choices, with public counts and the current colour, for a computer player.
HitotsuViewtypeA COMPUTER AT THE HITOTSU TABLE.
hitotsuWinnersfunctionOnce the game is over: whoever went out in a game of one hand; otherwise the highest score, level on it sharing the win.
hitotsuWordsfunction"red five", "blue draw two", "wild draw four", as a sentence and a screen reader say it; in Japanese, "赤の5", "青のドロー2", "ワイルドドローフォー".
identicalfunctionWhether two cards are the same card to play (the two red fives are).
isClothfunctionWhether a text names a cloth.
isDrawCardfunctionWhether a card makes somebody draw: a Draw Two or a Wild Draw Four.
isHitotsuCardfunctionWhether an unknown value is an actual physical card id from the deck.
isNumberfunctionWhether a card is a number, 0 to 9.
isWildfunctionWhether a card is a Wild or Wild Draw Four.
longestColourfunctionThe colour this hand holds most of, red first among equals so the choice is always the same.
mixSeedfunctionTwo numbers mixed into one seed, so each hand of a game is shuffled from its own.
mountHitotsufunctionPut a table of Hitotsu into an element: the person at this screen in seat 0, computers in the rest.
movesForfunctionEverything this seat may do now: its own turn's moves, or, at another's turn, the cards it may jump in with.
namedTablefunctionThe game with its seats' names written in, a seat with no name keeping the one it had.
playableForfunctionThe cards this seat may play now, in turn or jumping in.
playHitotsufunctionApply a legal move and return a new game with that move recorded; null for an illegal move or a finished game.
quickMovefunctionWhat a card tapped twice plays: its one way, or null where there is a colour or a seat to choose.
RandomtypeA source of numbers in [0, 1): Math.random, or a seeded one so a deal can be made again.
readHitotsuMovefunctionA move as something sent it, checked for its shape only: whether it may be made is the rules'.
readHitotsuOptionsfunctionHouse rules as something sent them, checked for shape, or null.
readTableMovefunctionA move as a device sent it, checked for its shape, or null; a jump is never a move at a table on several devices.
readTableSetUpfunctionThe set-up as a device sent it, checked for its shape, jumping in taken off, or null.
reshuffledHitotsufunctionThese cards shuffled again, the same way for the same seed and salt: a pile turned over to make a new stock.
REVERSEconstantThe face code for a Reverse card.
SEED_MOSTconstantThe largest seed a deal takes: a whole number that travels in an address or a request as it is.
seededRandomfunctionA seeded generator (mulberry32): the same seed gives the same numbers, on every machine.
shuffledfunctionA shuffled copy (Fisher–Yates); the list given is left as it was.
shuffledHitotsufunctionThe deck shuffled for one hand of one game: the same seed and hand always the same order.
SKIPconstantHITOTSU'S DECK, as the rules see it: 108 short names.
sortHitotsufunctionA hand as a player holds it: by colour, numbers then actions, the wilds last.
startHitotsufunctionDeal a new seeded game for two to eight players at a supported match length; null for an unsupported length or player count.
startTablefunctionA new table: count seats with blank names (a table's names are its seats', written in when it is shown), the seats in computers played by the computer player.
tableComputerMovefunctionThe computer player's move for this seat, or null when the table is not waiting on it.
tableToPlayfunctionThe seat the table waits on, or null once the game is over.
VERSIONconstantThe version of this package, as package.json has it.
waysForfunctionThe ways this card may go down, the call made or not as the player said (where that is a choice).
WILDconstantThe face code for a Wild card.
WILD_FOURconstantThe face code for a Wild Draw Four card.