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;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
code | string | The game as a code, every piece facing as it does now: what |
progress | string | The game as a short string to keep a game half played ( |
turns | number | Taps that turned a piece. |
hints | number | Hints asked for. |
solved | boolean | |
cell (省略可) | number | undefined | The piece turned, for |
例
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
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。