Reference · Pipes, rules and solving
bigKindOffunction
Which kind of big piece four masks make, and the fewest quarters clockwise from facing north that bring it to them; null for four masks that are none of the five.
Import it
import { bigKindOf } from "@johnmorrisdotca/suido";
Definition
function bigKindOf(masks: readonly number[]): { kind: BigKind; quarters: number; } | null
Parameters
| Name | Type | Description |
|---|---|---|
masks | readonly number[] | Current pipe masks in row-major cell order. |
Returns
{ kind: BigKind; quarters: number; } | null
Which kind of big piece four masks make, and the fewest quarters clockwise from facing north that bring it to them; null for four masks that are none of the five.
Examples
import { bigKindOf, bigMasksOf } from "@johnmorrisdotca/suido";
console.log(bigKindOf(bigMasksOf("elbow",1)));{ kind: 'elbow', quarters: 1 }What it prints (run when this page was built)