Reference · Tiles, layouts and deals
tilesLeftfunction
How many tiles are still on the layout.
Import it
import { tilesLeft } from "@johnmorrisdotca/jarajara";
Definition
function tilesLeft(cells: MahjongCells): number
Parameters
| Name | Type | Description |
|---|---|---|
cells | string | The face-code string in native slot order; dot marks a removed tile. |
Returns
number
How many tiles are still on the layout.
Examples
import { generateAwase } from "@johnmorrisdotca/jarajara/awase";
import { tilesLeft } from "@johnmorrisdotca/jarajara";
const deal = generateAwase(4,"easy",2026);
const cells = deal.givens;
console.log(tilesLeft(cells));8What it prints (run when this page was built)