Tenka documentation
Tenka 天下 — World conquest strategy game
Play seeded world conquest for two to six, with dice battles, cards, computer players and saved games.
Install
npm install @johnmorrisdotca/tenka
Start here
Entry points
| Import it | What it is | Size |
|---|---|---|
@johnmorrisdotca/World outlines · 3 exports | How Tenka's world is drawn: one outline per territory, where its counter stands, the sea links and the continents' borders. | 59.0 kB |
@johnmorrisdotca/Browser table and SVG · 32 exports | Tenka drawn and played in the browser, in plain DOM: a whole table against the computer (mountTenka), and the map on its own (tenkaMapSvg, drawn from tenkaMapModel). | 81.9 kB |
@johnmorrisdotca/React table · 4 exports | 94.2 kB | |
@johnmorrisdotca/Dice and card dressing · 12 exports | Tenka's table dressed in the family's dice and cards: Korokoro's dice for the dice of every attack, tumbling onto the faces the game threw, and Toranpu's cards for the cards in a hand, with a territory card of Tenka's own and a back of Tenka's own for the deck. | 136.1 kB |
@johnmorrisdotca/Table element · 4 exports | 84.8 kB | |
@johnmorrisdotca/Register the table · 4 exports | Define the default table when imported; no effect on a server. | 84.9 kB |
@johnmorrisdotca/Rules, maps and records · 122 exports | Tenka 天下: the classic world-conquest game on a map of the modern world, for two to six players, as plain functions over plain data. | 14.9 kB |
Guides
How-to
- Play a complete turnFollow the phases of a full turn, let the engine decide what is legal, and run the computer players.
- Read battles and trade cardsRead battle outcomes from dice, use the native attack and blitz actions, and trade card sets.
- Save, restore and exportSave a game as its deal and moves, restore it by replaying them, and export a readable record.
- Share a daily starting dealShare a daily starting deal from the UTC date, and keep past days reproducible.
- Mount and embed a tableMount a table in the DOM or as a custom element, and keep private names out of events and frames.
Explanation
- State and seeded rulesSee how a game is one value, how dice and plans draw from separate random streams, and how the source is laid out.
- Maps, SVG and dressingUse the map connections the rules read, draw them as SVG, and dress the table with Korokoro dice and Toranpu cards.