concedeKind関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
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 { concedeKind } from "@johnmorrisdotca/sugoroku";
定義
function concedeKind(game: GameState, side: Side): WinKind
引数
| 名前 | 型 | 説明 |
|---|---|---|
game | GameState | The current immutable native game state. |
side | Side | The side being examined: white or black. |
戻り値
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.
例
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"));backgammon出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。