Reference · Rolls and exact odds
DiceWarThrowtype
One throw of the table: everybody who had to roll, in seat order, the war it was in (0 for the round's first throw), the seats that tied for highest, and who took the stake: null where the throw was a tie and the war goes on, or the round was called off.
Import it
import type { DiceWarThrow } from "@johnmorrisdotca/korokoro";
Definition
type DiceWarThrow = {
round: number;
war: number;
rolls: DiceWarRoll[];
tied: number[];
winner: number | null;
stake: number;
};
Members
| Name | Type | Description |
|---|---|---|
round | number | |
war | number | |
rolls | DiceWarRoll[] | |
tied | number[] | |
winner | number | null | |
stake | number |
Examples
import type { DiceWarThrow } from "@johnmorrisdotca/korokoro";
import { startDiceWar, playDiceWar } from "@johnmorrisdotca/korokoro";
const value: DiceWarThrow = playDiceWar(startDiceWar({ players: ["One", "Two"], computers: [true, true], seed: "docs" })!, {})!.throws[0]!;
console.log(value.round);1What it prints (run when this page was built)