Reference · Pipes, rules and solving
rotationsOffunction
Every way a piece can face, each once and in order: one for a cross, two for a straight, four for the rest.
Import it
import { rotationsOf } from "@johnmorrisdotca/suido";
Definition
function rotationsOf(mask: number): number[]
Parameters
| Name | Type | Description |
|---|---|---|
mask | number | A pipe mask: north 1, east 2, south 4 and west 8. |
Returns
number[]
Every way a piece can face, each once and in order: one for a cross, two for a straight, four for the rest.
Examples
import { rotationsOf } from "@johnmorrisdotca/suido";
console.log(rotationsOf(5));[ 5, 10 ]What it prints (run when this page was built)