TENKA_EUROPE_SHAPESconstant
How Tenka's Europe is drawn: Miller's projection from 12°W to 44°E and 31°N to 66.5°N, 2000 by 1672 units.
Every export of every entry point, each with its own page. This page keeps the addresses the old one-page reference had.
@johnmorrisdotca/tenka/shapesTENKA_EUROPE_SHAPESconstantHow Tenka's Europe is drawn: Miller's projection from 12°W to 44°E and 31°N to 66.5°N, 2000 by 1672 units.
TENKA_SHAPESconstantHow Tenka's world is drawn: Miller's projection from 170°W round to 192°E, 2000 by 984 units.
TenkaShapestypeHow the world is drawn, in map units (tenkaShapes.data.ts, written by scripts/map.mjs).
@johnmorrisdotca/tenka/uiClothtypeA cloth's name.
clothVarsfunctionA cloth as CSS variables; nothing for a name that is not a cloth, so the defaults stay.
continentNameInfunctionA continent's name in a table of strings, by its key ("northAmerica", "asia"…).
continentViewfunctionThe part of the map that frames a continent, with a margin, widened to the map's own shape so it fills the same box; the whole world for null.
isClothfunctionWhether a text names a cloth.
landInDirectionfunctionThe territory a key moves to from another: the nearest counter in that direction, a little straighter being better than a little nearer, and only among those inside view (the whole map when none is given), so that the focus never leaves what is on the screen.
mountTenkafunctionA WHOLE TABLE OF TENKA IN PLAIN DOM: the map, whose turn it is and what to do, the players, your cards and the last dice, played against the computer (or by people taking turns on one device, with computers all false).
nearestLandfunctionThe territory whose counter is nearest a point of the map, within reach map units, or null.
NO_MARKSconstantNothing lit up.
ownerColourfunctionThe colour a territory's owner is drawn in.
TENKA_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.
TENKA_MAP_SHAPESconstantHow each map is drawn.
TENKA_NEUTRAL_COLOURconstantThe grey of the neutral army.
TENKA_SEAT_COLOURSconstantTHE COLOURS A TABLE IS DRAWN IN: one for each of six seats, and a grey for the neutral army that holds a third of the world in a game for two.
TENKA_STRINGSconstantThe package's words in each language it speaks: TENKA_STRINGS.en, TENKA_STRINGS.ja.
TENKA_STYLEconstantThe table's own styles, scoped to .tk-root, with every colour a CSS variable so a page can wear it in its own colours (set them on the element or any ancestor, or pass them as theme).
TenkaArrowtypeA way to move between territories from a keyboard.
TenkaBackHowtypeWhat a dressing is told about the back it is asked to draw.
TenkaCardHowtypeWhat a dressing is told about a card it is asked to draw.
tenkaCountfunctionA count said in the singular when it is one and the plural otherwise: tenkaCount(strings.countCardsOne, strings.countCards, 1) is "1 card".
TenkaDieHowtypeWhat a dressing is told about a die it is asked to draw.
TenkaDrawntypeSomething a dressing drew: the element to put on the table, and what to do when the table takes it away again (stop a timer, say).
TenkaDressingtypeHOW A TABLE DRAWS ITS DICE AND ITS CARDS, if not the plain way: each is a function that is given what the rules decided and hands back the element to show.
TenkaLandtypeOne territory as a drawing needs it.
TenkaLocaletypeThe languages the package speaks: English and Japanese.
tenkaMapModelfunctionEVERYTHING A DRAWING OF THE WORLD NEEDS, for one game: each territory's outline in its owner's colour, its counter's place and armies, and its ring.
TenkaMapModeltypeThe whole world as a drawing needs it, in map units: tenkaMapModel makes one, tenkaMapSvg and TenkaMap draw it.
tenkaMapSvgfunctionTHE WORLD AS AN SVG ELEMENT, drawn from a model (tenkaMapModel): the sea, each territory in its owner's colour, the continents' borders and the sea links, the rings of a choice, and a counter of armies on each.
TenkaRingtypeHow a territory is ringed: the one chosen, one it can reach, or the target.
tenkaSayfunctionA line from a table of strings with its braces filled in: tenkaSay(strings.moveIn, { n: 3 }) is "Move 3 in".
tenkaShapesOffunctionHow a game's map is drawn: the world unless the game says otherwise.
tenkaStringsfunctionThe table of strings for a locale with a page's own words laid over it.
TenkaStringstypeEvery table word, including local embed error feedback.
TenkaTableHandletypeNative game access, restoration, redealing and presentation updates.
TenkaTableOptionstypeNative table settings; defaults to three players, with two computers.
TenkaViewtypeA part of the map to show, in map units: left, top, width, height (an SVG viewBox).
territoryNameInfunctionA territory's name in a table of strings, by its key (TENKA_TERRITORIES[n].key, such as "alaska"); "" for a key that is no territory's.
@johnmorrisdotca/tenka/reactTenkaMapfunctionTHE WORLD, AS A REACT COMPONENT: every territory in its owner's colour, its counter of armies, the rings of a choice, and a press on a territory or its counter reported by number.
TenkaMapPropstypeWhat TenkaMap takes: a game to draw, and any attribute of its <svg>.
TenkaTablefunctionA whole table against the computer, as a React component: the plain-DOM table (mountTenka) mounted into this component's element once the browser has it.
TenkaTablePropstypeWhat TenkaTable takes: the options of mountTenka, and any attribute of its <div>.
@johnmorrisdotca/tenka/dressingTENKA_BACKconstantTenka's own back, as the deck shows it.
TenkaBackHowtypeWhat a dressing is told about the back it is asked to draw.
tenkaCardDesignfunctionTenka's cards as a Toranpu design: ask Toranpu for tenkaCardId(map, territory) in this design and it draws the territory's shape and name with its army's symbol, on its paper and in its frame.
TenkaCardHowtypeWhat a dressing is told about a card it is asked to draw.
tenkaCardIdfunctionThe id of a card in Toranpu's hands: tenka-world-12 for the world's twelfth territory, tenka-wild for a wild card.
tenkaCardOfIdfunctionThe map and territory an id of tenkaCardId names, or null for a wild card (wild: true) or anything else.
TenkaDieHowtypeWhat a dressing is told about a die it is asked to draw.
TenkaDrawntypeSomething a dressing drew: the element to put on the table, and what to do when the table takes it away again (stop a timer, say).
tenkaDressingfunctionTenka's dice and cards, drawn by the packages that draw them best: give the result to mountTenka, to the React TenkaTable, or to a <tenka-table>'s dressing.
TenkaDressingtypeHOW A TABLE DRAWS ITS DICE AND ITS CARDS, if not the plain way: each is a function that is given what the rules decided and hands back the element to show.
TenkaDressingOptionstypeWhat tenkaDressing may be given.
tenkaThrownDiefunctionA random source for Korokoro that comes up with face on a die of six: how a die is made to tumble onto the face the game has already thrown.
@johnmorrisdotca/tenka/elementdefineTablefunctionRegister a default or custom-tag table; server-safe and idempotent.
TENKA_EMBED_OPTION_KEYSconstantNative options, checked by shared builder coverage.
TenkaElementOptionstypeFull native host options, including names and custom card/dice drawings.
TenkaTableclassA reflected native Tenka table, safe to import without a browser.
@johnmorrisdotca/tenka/element/definedefineTablefunctionRegister a default or custom-tag table; server-safe and idempotent.
TENKA_EMBED_OPTION_KEYSconstantNative options, checked by shared builder coverage.
TenkaElementOptionstypeFull native host options, including names and custom card/dice drawings.
TenkaTableclassA reflected native Tenka table, safe to import without a browser.
@johnmorrisdotca/tenkaareNeighboursfunctionWhether two territories are neighbours, by land or by sea.
armiesHeldfunctionHow many armies an owner has on the map.
attacksOpenfunctionEvery attack open now: from each territory of theirs with armies to spare, on each neighbour somebody else holds, with each number of dice — and the same attack again and again until it is decided.
battleLossesfunctionWHO LOSES WHAT: the highest die of each side compared, then the next highest, as many pairs as the side with fewer dice threw.
beginTurnfunctionA turn starting for seat: its armies worked out, nothing yet taken, nothing rolled.
boardOffunctionThe map an argument names, and the world for anything that is not one: these functions are handed to an array's map and filter (deck.map(cardKind)), which pass an index where the map would go.
cardKindfunctionWhat a card shows: land, sea or air for a territory's card, in turn round the map; wild for a wild card.
cardTerritoryfunctionThe territory a card shows, or null for a wild card.
choiceNowfunctionA choice made on an earlier map, read against this one: only what still stands, and a number of armies the move can take.
cleanTenkaNamefunctionA name as the table typed it, tidied: spaces run together, trimmed, cut to TENKA_NAME_MOST.
connectedOwnfunctionEvery territory of the same owner reachable from this one through that owner's own territories, in order; never the territory itself.
continentNameInfunctionA continent's name in a table of strings, by its key ("northAmerica", "asia"…).
continentsHeldfunctionThe continents a seat holds every territory of.
countedfunctionTHE COUNT, when the last round is over: whoever holds the most territories wins; level on territories, whoever has more armies on the map; level on both, they share the win.
decodeTenkafunctionA kept game read back, or null for nothing kept, or for text that is not a game these rules can play out again: a browser's storage is somebody's to edit, and a half-understood game is worse than none.
defendDicefunctionThe dice a defender holding armies throws: as many as allowed, since more never hurts the defence.
encodeTenkafunctionA game as text to keep: its table and its moves.
endOfTurnfunctionTHE END OF A TURN: a card for a player who took a territory in it, then the next player still in.
finishedfunctionThe game ended, with these seats winning.
isSetfunctionWhether three cards make a set: three of one kind, one of each kind, or any two with a wild card (a wild card stands for whatever the set needs).
isTenkaSeedfunctionWhether a number is a seed a game can be dealt from: a whole number from 0 to TENKA_SEED_MOST.
isTenkaTablefunctionWhether a game this long for this many players is one Tenka is offered for.
isTerritoryfunctionWhether a number is a territory of the map.
isWildfunctionWhether a card is one of the two wild cards.
marksForfunctionWhat the map lights up for a choice.
mostAttackDicefunctionThe most dice an attacker may throw from a territory holding armies: one army always stays behind.
mustTradefunctionWhether the player to move must trade cards before anything else: five or more in hand while reinforcing.
nextRandomfunctionThe next number from the random at state, in [0, 1), and the state after it.
nextSeatInfunctionThe next player still in after seat, round the table; the neutral army never takes a turn.
NO_CHOICEconstantNothing chosen: where a turn, and a table, start.
playTenkafunctionThe game after the player to move makes move, or null when they may not: a move for another phase, a territory not theirs, a neighbour that is not one, dice they have not the armies for, a set that is not a set.
randomBelowfunctionA whole number from 0 to below - 1, and the state after it.
readTenkaMovefunctionA kept move read back, or null for anything that is not one.
reinforcementForfunctionTHE ARMIES A TURN BRINGS: one for every three territories held, never fewer than three, and each continent held whole adds its bonus.
replayTenkafunctionA game made again from its table and its moves, or null if any move could not have been made when it was.
sensibleTenkaMovefunctionThe computer player's move: one the rules accept, chosen as a person might.
setsInfunctionEvery set a hand holds, each as its three cards smallest first, in order.
shuffledfunctionA list in a random order (Fisher and Yates), and the state after it; the list given is left alone.
startTenkafunctionA NEW GAME, all of it drawn from seed: who goes first; the territories shuffled and dealt round the table one at a time from that player, each with one army on it (at a table of two, dealt three ways, the neutral army taking every third); the cards shuffled; and each player's starting armies (TENKA_STARTING_ARMIES) less the ones already on their territories — scattered at random when placing is auto, or left to be placed by hand, one at a time round the table.
tapTerritoryfunctionWhat tapping territory does now: a new choice, and the move to make at once, if the tap is one.
TENKA_ATTACK_DICEconstantThe most dice an attacker throws.
TENKA_CARD_KINDSconstantThe three kinds a territory's card shows, in turn round the map, and the wild card that is any of them.
TENKA_CONTINENTSconstantThe world's six continents, each with the territories in it.
TENKA_CSV_COLUMNSconstantThe columns of the CSV export, in order.
TENKA_DECKconstantEvery card in the game: the territories' cards, then the wild cards.
TENKA_DEFEND_DICEconstantThe most dice a defender throws.
TENKA_EXPORT_FORMATconstantThe shape of the JSON this package writes.
TENKA_FEWEST_PLAYERSconstantThe fewest at a table: two, joined by the neutral army.
TENKA_LEAST_REINFORCEMENTconstantThe fewest armies a turn brings, however little is held.
TENKA_LENGTHSconstantThe lengths of game startTenka takes, in rounds: 10, 20 and 60.
TENKA_MAP_LISTconstantThe maps in the order a set-up offers them: the world first, the usual one.
TENKA_MAPSconstantEvery map a game may be played on, by key.
TENKA_MEDIUM_ROUNDSconstantThe medium game: twenty rounds, then the count.
TENKA_MOST_PLAYERSconstantThe most at a table: six.
TENKA_MOVESconstantThe kinds of move, by name: what goes in a move's kind.
TENKA_MUST_TRADE_ATconstantWith this many cards in hand a player must trade before placing; after knocking somebody out, down to fewer than this.
TENKA_NAME_MOSTconstantThe longest name a seat keeps.
TENKA_NEUTRALconstantThe owner of the territories nobody at a table of two holds: the neutral army, which never takes a turn.
TENKA_PHASESconstantThe phases of a turn, by name: compare game.phase with these rather than with text typed out.
TENKA_PLACINGconstantHow the starting armies are placed: scattered at random (auto), or by the players in turn (hand).
TENKA_SEED_MOSTconstantThe largest seed a game keeps: the random's state is one 32-bit number.
TENKA_SHORT_ROUNDSconstantThe short game: ten rounds, then the count.
TENKA_STARTING_ARMIESconstantTHE ARMIES EACH PLAYER STARTS WITH, by how many are playing: the standard table.
TENKA_STRINGSconstantThe package's words in each language it speaks: TENKA_STRINGS.en, TENKA_STRINGS.ja.
TENKA_TERRITORIESconstantThe world's territories: the map a game is played on unless it says otherwise.
TENKA_TERRITORIES_PER_ARMYconstantHow many territories held bring one army each turn: three.
TENKA_TERRITORY_CARD_BONUSconstantThe armies placed straight onto a territory the trader holds, when a card of the set shows it.
TENKA_TERRITORY_COUNTconstantHow many territories the world has: forty-two.
TENKA_TRADE_STEPconstantHow much more each set is worth than the last, once TENKA_TRADE_VALUES runs out: 20, 25, 30…
TENKA_TRADE_VALUESconstantWHAT A SET OF CARDS IS WORTH, by how many sets anybody has traded in before it: 4, 6, 8, 10, 12, 15, and five more for every set after that — the escalating standard schedule.
TENKA_VERSIONconstantThe version of this package, as package.json has it.
TENKA_WILDconstantThe kind of a wild card, which stands for whatever a set needs.
TENKA_WILD_CARDSconstantHow many wild cards are in the deck.
TENKA_WORLD_ROUNDSconstantThe whole world: played to the last player standing, and counted after sixty rounds if nobody is.
tenkaAgainfunctionThe same table again, from nothing, with a new seed: a new deal, a new first player, new dice.
TenkaCardtypeA territory's card (0–41) or a wild card (42, 43).
TenkaCardKindtypeWhat a card shows: one of three kinds, or a wild card that stands for any of them.
TenkaChoicetypeA choice made on the map and not yet a move: where from, where to, and how many armies (tapTerritory).
tenkaContinentfunctionA continent of a map by its key.
TenkaContinenttypeA continent: its name, the armies holding all of it is worth each turn, and its territories.
TenkaContinentKeytypeA continent of any map, by key: the world's continents and Europe's regions.
tenkaCountfunctionA count said in the singular when it is one and the plural otherwise: tenkaCount(strings.countCardsOne, strings.countCards, 1) is "1 card".
tenkaDailySeedfunctionToday's seed, the date as a number: 2026-10-01 is 20261001.
tenkaDayfunctionThe day a moment falls on, in UTC, written YYYY-MM-DD.
tenkaDeckForfunctionEvery card of a game on this map: a card for each territory, numbered as the territories are, then the wild cards.
TenkaEuropeRegionKeytypeEurope's eleven regions, by key: the continents of the Europe map.
tenkaExportedfunctionA game as the JSON export's object: its table, its moves, and where it stands.
TenkaExportedtypeA whole JSON export of one game: what tenkaToJSON writes and tenkaFromJSON reads.
tenkaFromJSONfunctionA game from JSON that tenkaToJSON wrote, or text that encodeTenka did.
TenkaGametypeA game, as its moves make it.
TenkaLocaletypeThe languages the package speaks: English and Japanese.
TenkaMaptypeA map as the rules read it: its territories, its continents and each territory's neighbours by land and by sea.
TenkaMapKeytypeThe maps a game may be played on.
TenkaMapMarkstypeWhat the map lights up for a choice (marksFor): the territory chosen, what it can reach, and the target.
tenkaMapOffunctionThe map a game is played on: the one it was started on, and the world for a game saved before there was a choice.
TenkaMovetypeA move, as playTenka takes it.
TenkaMoveKindtypeThe kinds of move, by name.
tenkaMovesfunctionEvery move the player to move may make now, each one playTenka accepts.
tenkaNeighboursfunctionA territory's neighbours, by land and by sea.
tenkaOverfunctionWhether the game is over.
TenkaOwnertypeWho holds a territory: a seat, or TENKA_NEUTRAL.
TenkaPhasetypeWhere a turn is.
TenkaPlacingtypeStarting armies placed at random, or by hand in turn.
tenkaPlayerNamefunctionA seat's name as the table reads it: the one given, or "Player 3".
tenkaRecordfunctionTHE RECORD OF A GAME, move by move, with the dice and everything else each move brought: made by playing the game again from its seed.
TenkaRecordEntrytypeOne move of a game's record, with what came of it: what the text and the CSV are written from.
TenkaRolltypeOne roll of the dice — or the last of a run of them (blitz) — what each side threw, highest first, and what each lost in all.
tenkaSayfunctionA line from a table of strings with its braces filled in: tenkaSay(strings.moveIn, { n: 3 }) is "Move 3 in".
TenkaSeattypeA player's place round the table: 0 for the first name given, up to 5.
TenkaShapestypeHow the world is drawn, in map units (tenkaShapes.data.ts, written by scripts/map.mjs).
tenkaStringsfunctionThe table of strings for a locale with a page's own words laid over it.
TenkaStringstypeEvery table word, including local embed error feedback.
TenkaTerritoryDatatypeOne territory as the map script writes it: neighbours by land and by sea are indices into the same list.
tenkaToCSVfunctionA game as CSV, a row to a move, for a spreadsheet: TENKA_CSV_COLUMNS.
tenkaToJSONfunctionA game as JSON, two spaces deep, with the format's number first.
tenkaToTextfunctionA game as plain text, a line to a move, for a chat or a log: who placed what where, every throw of the dice, every territory taken, and how it ended.
TenkaTradetypeThe last set of cards traded in, for the table to see: by whom, for how many, and the territory that got two more.
TenkaWorldContinentKeytypeThe world's six continents, by key.
territoriesHeldfunctionHow many territories an owner holds.
territoryNameInfunctionA territory's name in a table of strings, by its key (TENKA_TERRITORIES[n].key, such as "alaska"); "" for a key that is no territory's.
throwDicefunctioncount dice, highest first, and the state after them.
tradeValuefunctionWhat the next set traded in is worth, when trades sets have been traded before it: 4, 6, 8, 10, 12, 15, 20, 25…
writeTenkaMovefunctionA move as the short list it is kept as — and sent as, to the other devices at a table played on several.