endedWithNoMovesfunction
Whether the game ended because neither side had a move: two forced passes, the last two moves on the record.
Import it
import { endedWithNoMoves } from "@johnmorrisdotca/narabe";
Definition
function endedWithNoMoves(state: GameState): boolean
Parameters
| Name | Type | Description |
|---|---|---|
state | GameState | The current immutable game position. |
Returns
boolean
Whether the game ended because neither side had a move: two forced passes, the last two moves on the record.
Examples
import { createGame, endedWithNoMoves } from "@johnmorrisdotca/narabe";
const state = createGame({variant:"freestyle",size:15});
console.log(endedWithNoMoves(state));falseWhat it prints (run when this page was built)