Hitotsu documentation
Hitotsu 一つ — Colour-card shedding game for two to eight
Match the colour or number, call with one card left, and play classic or party rules against computers or at a shared table.
Install
npm install @johnmorrisdotca/hitotsu
Start here
Entry points
| Import it | What it is | Size |
|---|---|---|
@johnmorrisdotca/React components · 4 exports | 54.4 kB | |
@johnmorrisdotca/Table element · 5 exports | 42.7 kB | |
@johnmorrisdotca/Register the tag · 5 exports | <hitotsu-table>, registered by being imported: | 42.7 kB |
@johnmorrisdotca/Registration alias · 5 exports | <hitotsu-table>, registered by being imported: | 42.7 kB |
@johnmorrisdotca/Card sounds · 10 exports | The sounds of a card table, from real recorded cards: a card dealt, turned over or played, the deck shuffled. | 30.4 kB |
@johnmorrisdotca/Game engine and table · 94 exports | Hitotsu 一つ: a colour-card shedding game for two to eight, with the house rules people actually play. | 42.2 kB |
Guides
How-to
- Choose house rulesChoose the classic or party rules, set the match length and check the settings you receive.
- Run a computer playerAsk the computer player for a move, handle out-of-turn jump-ins, and see what it knows.
- Save and restore a gameSave a game as its setup and moves, restore it by replaying them, and decide what to share.
- Mount or embed a tablePut a playable table on a page, change it without a re-deal, and embed it in React, a tag or a frame.
- Use the shared-table adapterConnect tables on several devices with adapters while your app keeps the network and the hidden hands.
Explanation
- The engine and its stateRead the game state, card identity, seeded shuffles and scoring of the rules engine.
- Cards, language and soundsDraw cards from one shared model, read them without relying on colour, and load recorded sounds only when needed.