Skip to the content

Tenka天下

Play seeded world conquest for two to six, with dice battles, cards, computer players and saved games.

Tenka means the world under heaven in Japanese. About the name

Contents

Reference · Rules, maps and records

throwDicefunction

count dice, highest first, and the state after them.

Import it

import { throwDice } from "@johnmorrisdotca/tenka";

Definition

function throwDice(state: number, count: number): { value: number[]; state: number; }

Parameters

NameTypeDescription
statenumber

The seeded random generator state before the draw.

countnumber

The player or item count requested.

Returns

{ value: number[]; state: number; }

count dice, highest first, and the state after them.

Examples

import { throwDice } from "@johnmorrisdotca/tenka";

console.log(throwDice(42,3));
{ value: [ 6, 4, 3 ], state: 1199730185 }

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/tenka 2.2.0.