Reference · Pipes, rules and solving
canTurnfunction
Whether a piece can be turned into a new facing: ground, and a cross, look the same turned any way.
Import it
import { canTurn } from "@johnmorrisdotca/suido";
Definition
function canTurn(mask: number): boolean
Parameters
| Name | Type | Description |
|---|---|---|
mask | number | A pipe mask: north 1, east 2, south 4 and west 8. |
Returns
boolean
Whether a piece can be turned into a new facing: ground, and a cross, look the same turned any way.
Examples
import { canTurn } from "@johnmorrisdotca/suido";
console.log(canTurn(3));trueWhat it prints (run when this page was built)