Reference · Rules, tiles and records
partyFitsfunction
Whether a bag of this many tiles can be played by this many: one player can play any bag.
Import it
import { partyFits } from "@johnmorrisdotca/kumimoji";
Definition
function partyFits(players: number, hand: number, tiles: number): boolean
Parameters
| Name | Type | Description |
|---|---|---|
players | number | The requested player count or current player rows. |
hand | number | The hand size or tile codes, as declared by the function signature. |
tiles | number | The map from row,column square names to internal tile codes. |
Returns
boolean
Whether a bag of this many tiles can be played by this many: one player can play any bag.
Examples
import { partyFits } from "@johnmorrisdotca/kumimoji";
console.log(partyFits(2,3,12));trueWhat it prints (run when this page was built)