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 · Playable board

SuidoEventDetailtype

What a mounted board tells of itself in every event.

Import it

import type { SuidoEventDetail } from "@johnmorrisdotca/suido/play";

Definition

type SuidoEventDetail = {
    code: string;
    progress: string;
    turns: number;
    hints: number;
    solved: boolean;
    cell?: number;
};

Members

NameTypeDescription
codestring

The game as a code, every piece facing as it does now: what checkSuidoAnswer takes, with the board's own code.

progressstring

The game as a short string to keep a game half played (gameFromProgress and the progress option bring it back).

turnsnumber

Taps that turned a piece.

hintsnumber

Hints asked for.

solvedboolean
cell (optional)number | undefined

The piece turned, for suido-turn, and the piece lit, for suido-hint.

Examples

import { SUIDO_5X5 } from "@johnmorrisdotca/suido/levels-5x5";
import { gameProgress, isGameSolved, newGame } from "@johnmorrisdotca/suido";
import type { SuidoEventDetail } from "@johnmorrisdotca/suido/play";

const row = SUIDO_5X5[0];
const code = row[0];
const game = newGame(code)!;
const value: SuidoEventDetail = {code,progress:gameProgress(game),turns:game.turns,hints:0,solved:isGameSolved(game)};
console.log(value);
{
  code: '5x5:j5a5C5I59Ib75f7a6CCa35aIC',
  progress: '0000000000000000000000000:0',
  turns: 0,
  hints: 0,
  solved: false
}

What it prints (run when this page was built)

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