hasFlipMovefunction
Whether the colour has a legal disc-flipping move.
Import it
import { hasFlipMove } from "@johnmorrisdotca/narabe";
Definition
function hasFlipMove(state: GameState, stone: Stone): boolean
Parameters
| Name | Type | Description |
|---|---|---|
state | GameState | The current immutable game position. |
stone | Stone | The black or white colour being examined. |
Returns
boolean
Whether the colour has a legal disc-flipping move.
Examples
import { createGame, hasFlipMove } from "@johnmorrisdotca/narabe";
const reversi = createGame({variant:"reversi"});
console.log(hasFlipMove(reversi,"black"));trueWhat it prints (run when this page was built)