Reference · Rolls and exact odds
diceWarOverfunction
Whether a game is over.
Import it
import { diceWarOver } from "@johnmorrisdotca/korokoro";
Definition
function diceWarOver(game: DiceWarGame): boolean
Parameters
| Name | Type | Description |
|---|---|---|
game | DiceWarGame | The current Dice War state. |
Returns
boolean
Whether a game is over.
Examples
import { diceWarOver } from "@johnmorrisdotca/korokoro";
import { startDiceWar } from "@johnmorrisdotca/korokoro";
const game = startDiceWar({ players: ["One", "Two"], computers: [true, true], goal: "rounds", to: 1, seed: "table" })!;
console.log(diceWarOver(game));falseWhat it prints (run when this page was built)