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

defendDicefunction

The dice a defender holding armies throws: as many as allowed, since more never hurts the defence.

Import it

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

Definition

function defendDice(armies: number): number

Parameters

NameTypeDescription
armiesnumber

The armies present on a territory.

Returns

number

The dice a defender holding armies throws: as many as allowed, since more never hurts the defence.

Examples

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

console.log(defendDice(2));
2

What it prints (run when this page was built)

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