upcomingPiecesfunction
The pieces after the one in hand, for the preview.
Import it
import { upcomingPieces } from "@johnmorrisdotca/narabe";
Definition
function upcomingPieces(state: GameState, count: number): Piece[]
Parameters
| Name | Type | Description |
|---|---|---|
state | GameState | The current immutable game position. |
count | number | The number of upcoming queue pieces to read. |
Returns
Piece[]
The pieces after the one in hand, for the preview.
Examples
import { createGame, upcomingPieces } from "@johnmorrisdotca/narabe";
const queued = createGame({variant:"dominoFive",seed:42});
console.log(upcomingPieces(queued,2));[
{ cells: [ [Object], [Object] ] },
{ cells: [ [Object], [Object] ] }
]What it prints (run when this page was built)