Reference · Rules, games and records
startGamefunction
The first game, or the next game, of a match.
Import it
import { startGame } from "@johnmorrisdotca/sugoroku";
Definition
function startGame(match: Match): GameState
Parameters
| Name | Type | Description |
|---|---|---|
match | Match | The current immutable match and score. |
Returns
GameState
The first game, or the next game, of a match.
Examples
import { newMatch, settingsFor, startGame } from "@johnmorrisdotca/sugoroku";
const settings = settingsFor("backgammon",{points:5,cube:true});
const match = newMatch(settings);
console.log(startGame(match).phase);openingWhat it prints (run when this page was built)