lastMovefunction
The point of the latest stone or piece move; null when no point was played.
Import it
import { lastMove } from "@johnmorrisdotca/narabe";
Definition
function lastMove(state: GameState): Point | null
Parameters
| Name | Type | Description |
|---|---|---|
state | GameState | The current immutable game position. |
Returns
Point | null
The last played point, or null when no move with a board point exists.
Examples
import { createGame, lastMove } from "@johnmorrisdotca/narabe";
const state = createGame({variant:"freestyle",size:15});
console.log(lastMove(state));nullWhat it prints (run when this page was built)