stackUpFitsfunction
Whether a card may go on a building pile: a wild always, a number when it is the one the pile wants.
Import it
import { stackUpFits } from "@johnmorrisdotca/toranpu/stack-up";
Definition
function stackUpFits(card: CardId, pile: readonly CardId[]): boolean
Parameters
| Name | Type | Description |
|---|---|---|
card | string | The card id to lay. |
pile | readonly string[] | The cards on the building pile. |
Returns
boolean
Whether a card may go on a building pile.
Examples
import { stackUpFits } from "@johnmorrisdotca/toranpu/stack-up";
console.log(stackUpFits("n01", []));trueWhat it prints (run when this page was built)