Reference · Rules, maps and records
isSetfunction
Whether three cards make a set: three of one kind, one of each kind, or any two with a wild card (a wild card stands for whatever the set needs).
Import it
import { isSet } from "@johnmorrisdotca/tenka";
Definition
function isSet(cards: readonly TenkaCard[], map?: TenkaMap): boolean
Parameters
| Name | Type | Description |
|---|---|---|
cards | readonly number[] | The card indices to test as a set. |
map (optional) | TenkaMap | The native world or Europe map to use. |
Returns
boolean
Whether three cards make a set: three of one kind, one of each kind, or any two with a wild card (a wild card stands for whatever the set needs).
Examples
import { isSet } from "@johnmorrisdotca/tenka";
console.log(isSet([0,1,2]));trueWhat it prints (run when this page was built)