Reference · Pipes, rules and solving
cellCharfunction
A cell's character: its piece, marked as a source or a drain if it is one.
Import it
import { cellChar } from "@johnmorrisdotca/suido";
Definition
function cellChar(mask: number, role?: "source" | "drain" | "plain"): string
Parameters
| Name | Type | Description |
|---|---|---|
mask | number | A pipe mask: north 1, east 2, south 4 and west 8. |
role (optional) | "source" | "drain" | "plain" | Whether the piece is a source, drain or plain pipe. |
Returns
string
A cell's character: its piece, marked as a source or a drain if it is one.
Examples
import { cellChar } from "@johnmorrisdotca/suido";
console.log(cellChar(3));3What it prints (run when this page was built)