Reference · Tiles, layouts and deals
dealFitsfunction
Whether a deal is written right for a layout: one face a slot, nothing empty.
Import it
import { dealFits } from "@johnmorrisdotca/jarajara";
Definition
function dealFits(size: number, givens: string): boolean
Parameters
| Name | Type | Description |
|---|---|---|
size | number | The native layout size identifier, measured in tiles across. |
givens | string | The original face-code deal in native slot order. |
Returns
boolean
Whether a deal is written right for a layout: one face a slot, nothing empty.
Examples
import { generateAwase } from "@johnmorrisdotca/jarajara/awase";
import { dealFits } from "@johnmorrisdotca/jarajara";
const deal = generateAwase(4,"easy",2026);
const cells = deal.givens;
console.log(dealFits(4,cells));trueWhat it prints (run when this page was built)