piecePlacementsfunction
Every legal footprint of the piece in hand. Empty when nothing fits.
Import it
import { piecePlacements } from "@johnmorrisdotca/narabe";
Definition
function piecePlacements(state: GameState): PieceCell[][]
Parameters
| Name | Type | Description |
|---|---|---|
state | GameState | The current immutable game position. |
Returns
PieceCell[][]
Every legal footprint of the piece in hand. Empty when nothing fits.
Examples
import { createGame, piecePlacements } from "@johnmorrisdotca/narabe";
const queued = createGame({variant:"dominoFive",seed:42});
console.log(piecePlacements(queued).length);840What it prints (run when this page was built)