Reference · Rules, games and records
concedeKindfunction
What a side gives up if it gives up the game now, which is the worst the position could come to: a single game once it has borne a checker off; a gammon if nothing of the other side's can still hit it; otherwise a backgammon where it may have a checker caught in the other side's home board.
Import it
import { concedeKind } from "@johnmorrisdotca/sugoroku";
Definition
function concedeKind(game: GameState, side: Side): WinKind
Parameters
| Name | Type | Description |
|---|---|---|
game | GameState | The current immutable native game state. |
side | Side | The side being examined: white or black. |
Returns
WinKind
What a side gives up if it gives up the game now, which is the worst the position could come to: a single game once it has borne a checker off; a gammon if nothing of the other side's can still hit it; otherwise a backgammon where it may have a checker caught in the other side's home board.
Examples
import { concedeKind, newGame, rollOpening, settingsFor } from "@johnmorrisdotca/sugoroku";
const settings = settingsFor("backgammon",{points:5,cube:true});
const game = rollOpening(newGame(settings),[3,1]);
console.log(concedeKind(game,"black"));backgammonWhat it prints (run when this page was built)