Getting started
Getting started
Install Tenka, start a seeded game and play one legal move.
Tenka is a seeded world-conquest engine for two to six players. The core uses plain data and needs no DOM, clock or runtime dependency. A separate table entry draws and plays the game.
Install
npm install @johnmorrisdotca/tenkaUse Node 22 or later or modern browsers. React is an optional peer for the React entry; Korokoro and Toranpu are optional peers for dice/card dressing.
Start and play a legal move
import {startTenka,tenkaMoves,playTenka} from "@johnmorrisdotca/tenka";
let game = startTenka(10,["Seat 1","Seat 2"],42);
if (!game) throw new Error("Invalid setup");
const move = tenkaMoves(game)[0];
const next = playTenka(game,move);
if (next) game = next;
console.log(game.phase,game.moves.length);reinforce 1startTenka takes rounds, players and seed, in that order. It returns null for invalid setup; playTenka returns null for a refused move. Keep the returned game only when non-null. The players are local names, not shared identifiers.
Pick a recipe
Turns, battles/cards, records, daily games, tables/embeds and the reference cover the next steps.