Reference · Rolls and exact odds
startDiceWarfunction
A new game, or null for a table it is not played at: fewer than two or more than eight players, dice or sides out of range, a goal out of range.
Import it
import { startDiceWar } from "@johnmorrisdotca/korokoro";
Definition
function startDiceWar(options: DiceWarOptions): DiceWarGame | null
Parameters
| Name | Type | Description |
|---|---|---|
options | DiceWarOptions | Options for this call; omitted fields keep their documented defaults. |
Returns
DiceWarGame | null
A new game, or null for a table it is not played at: fewer than two or more than eight players, dice or sides out of range, a goal out of range.
Examples
import { startDiceWar } from "@johnmorrisdotca/korokoro";
console.log(startDiceWar({ players: ["One", "Two"], seed: "table" })?.phase);playingWhat it prints (run when this page was built)