powerDropPreviewfunction
Returns the Shizen hard-drop landing and one-step rebound preview without changing state.
finalCells is where the pair locks after any rebound, the cells of the power-drop-landed event. Stones above a
gap then fall, so settledCells is where each stone of the pair comes to rest in the board the hard drop commits,
before any clear: draw a ghost from it. Both carry the pair's stable stone ids, and both are checked against
applyAction with a hard-drop over many played boards.
Import it
import { powerDropPreview } from "@johnmorrisdotca/houseki/colour-chains";
Definition
function powerDropPreview(state: GameState): ChainsPowerDropPreview | null
Parameters
| Name | Type | Description |
|---|---|---|
state | GameState | The immutable native state to read or transition; the input is retained. |
Returns
ChainsPowerDropPreview | null
Returns the Shizen hard-drop landing and one-step rebound preview without changing state. Returns null when there is no active piece or applicable preview.
Examples
import { createGame, powerDropPreview } from "@johnmorrisdotca/houseki/colour-chains";
const state=createGame({seed:"docs"});
console.log(powerDropPreview(state));nullWhat it prints (run when this page was built)