canTwistfunction
Whether the colour to move owes a quarter turn before the move is complete.
Import it
import { canTwist } from "@johnmorrisdotca/narabe";
Definition
function canTwist(state: GameState): boolean
Parameters
| Name | Type | Description |
|---|---|---|
state | GameState | The current immutable game position. |
Returns
boolean
Whether the colour to move owes a quarter turn before the move is complete.
Examples
import { canTwist, createGame } from "@johnmorrisdotca/narabe";
const state = createGame({variant:"freestyle",size:15});
console.log(canTwist(state));falseWhat it prints (run when this page was built)