Reference · Tiles, layouts and deals
geometryOffunction
What lies on and beside each slot, worked out once for a layout and kept.
Import it
import { geometryOf } from "@johnmorrisdotca/jarajara";
Definition
function geometryOf(layout: MahjongLayout): MahjongGeometry
Parameters
| Name | Type | Description |
|---|---|---|
layout | MahjongLayout | The native stacked tile positions. |
Returns
MahjongGeometry
What lies on and beside each slot, worked out once for a layout and kept.
Examples
import { geometryOf, layoutFor } from "@johnmorrisdotca/jarajara";
const layout = layoutFor(4)!;
console.log(geometryOf(layout).above.length);8What it prints (run when this page was built)