Reference · Rules, tiles and records
mayTradefunction
Whether a trade may be made: the bag holds as many as a trade takes.
Import it
import { mayTrade } from "@johnmorrisdotca/kumimoji";
Definition
function mayTrade(play: TilePlay): boolean
Parameters
| Name | Type | Description |
|---|---|---|
play | TilePlay | The current immutable solo-game progress. |
Returns
boolean
Whether a trade may be made: the bag holds as many as a trade takes.
Examples
import { deal, mayTrade } from "@johnmorrisdotca/kumimoji";
const play = deal("catdog",3);
console.log(mayTrade(play));trueWhat it prints (run when this page was built)