Reference · Rolls and exact odds
diceWarPeopleToRollfunction
The seats whose dice a move must hand in now: the people among those who roll. A table of computers needs none.
Import it
import { diceWarPeopleToRoll } from "@johnmorrisdotca/korokoro";
Definition
function diceWarPeopleToRoll(game: DiceWarGame): number[]
Parameters
| Name | Type | Description |
|---|---|---|
game | DiceWarGame | The current Dice War state. |
Returns
number[]
The seats whose dice a move must hand in now: the people among those who roll. A table of computers needs none.
Examples
import { diceWarPeopleToRoll } from "@johnmorrisdotca/korokoro";
import { startDiceWar } from "@johnmorrisdotca/korokoro";
console.log(diceWarPeopleToRoll(startDiceWar({ players: ["One", "Two"], seed: "table" })!));[ 0, 1 ]What it prints (run when this page was built)