本文へ移動

Suido水道

管を回してポンプと排水口をつなぎます。収録された問題やシード付きの問題で遊べます。

「水道」は、水を届ける設備を表す言葉です。 名前について(英語)

目次

リファレンス · 遊べる盤

SuidoEventDetail型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

What a mounted board tells of itself in every event.

インポート

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

定義

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

メンバー

名前型説明
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 (省略可)number | undefined

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

例

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
}

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/suido 1.7.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。