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

canTurnAtfunction

Whether a tap on cell of a game turns anything. On a piece of its own: it looks different turned, and it is not locked. In a block (blocks.ts): turning the block changes how its four pieces face.

Import it

import { canTurnAt } from "@johnmorrisdotca/suido";

Definition

function canTurnAt(game: Game, cell: number): boolean

Parameters

NameTypeDescription
gameGame

The current immutable game state.

cellnumber

A zero-based row-major cell index.

Returns

boolean

Whether a tap on cell of a game turns anything. On a piece of its own: it looks different turned, and it is not locked. In a block (blocks.ts): turning the block changes how its four pieces face.

Examples

import { SUIDO_5X5 } from "@johnmorrisdotca/suido/levels-5x5";
import { canTurnAt, newGame } from "@johnmorrisdotca/suido";

const row = SUIDO_5X5[0];
const code = row[0];
const game = newGame(code)!;
console.log(canTurnAt(game,0));
true

What it prints (run when this page was built)

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