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

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

NameTypeDescription
masknumber

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)

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