Skip to the content

Suido水道

Turn pipes to connect the pumps and drains, through fixed levels or seeded puzzles.

Suido means water supply in Japanese. About the name

Contents

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

NameTypeDescription
masknumber

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));
3

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/suido 1.7.0.