SuidoMountOptionstype
The initial puzzle, native controls, language and event callbacks for mounting a board.
Import it
import type { SuidoMountOptions } from "@johnmorrisdotca/suido/play";
Definition
type SuidoMountOptions = {
code: string;
answer?: string;
progress?: string;
shown?: boolean;
turning?: SuidoTurning;
hints?: boolean;
controls?: boolean;
chips?: boolean;
zoom?: "auto" | "off";
language?: SuidoLanguage;
onChange?: (detail: SuidoEventDetail) => void;
onTurn?: (detail: SuidoEventDetail) => void;
onHint?: (detail: SuidoEventDetail) => void;
onTurning?: (turning: SuidoTurning) => void;
onSolve?: (detail: SuidoEventDetail) => void;
};
Members
| Name | Type | Description |
|---|---|---|
code | string | The board, as its code ( |
answer (optional) | string | undefined | The board's one answer, as a code ( |
progress (optional) | string | undefined | A game half played, as |
shown (optional) | boolean | undefined | Open on the answer, saying it was solved before, until the next turn. Needs |
turning (optional) | SuidoTurning | undefined | Which way a tap turns a piece. Default clockwise. |
hints (optional) | boolean | undefined | Offer Hint, which lights a piece to turn. Needs |
controls (optional) | boolean | undefined | The buttons and the lines of words under the board. Default true. |
chips (optional) | boolean | undefined | A row of chips under the board: each twist the board has, or Plain, each with the line that explains it as its hover text. Default false. |
zoom (optional) | "auto" | "off" | undefined |
|
language (optional) | SuidoLanguage | undefined | The language the words are in. Left out, the host's own |
onChange (optional) | ((detail: SuidoEventDetail) => void) | undefined | |
onTurn (optional) | ((detail: SuidoEventDetail) => void) | undefined | |
onHint (optional) | ((detail: SuidoEventDetail) => void) | undefined | |
onTurning (optional) | ((turning: SuidoTurning) => void) | undefined | Told when the way a tap turns is changed, by the board's own button or by |
onSolve (optional) | ((detail: SuidoEventDetail) => void) | undefined |
Examples
import { SUIDO_5X5 } from "@johnmorrisdotca/suido/levels-5x5";
import { levelAnswer } from "@johnmorrisdotca/suido/levels";
import type { SuidoMountOptions } from "@johnmorrisdotca/suido/play";
const row = SUIDO_5X5[0];
const code = row[0];
const answer = levelAnswer(row)!;
const value: SuidoMountOptions = {code,answer,controls:true,language:"en"};
console.log(value);{
code: '5x5:j5a5C5I59Ib75f7a6CCa35aIC',
answer: '5x5:maaaI5CacE7eafd53IB53aaIB',
controls: true,
language: 'en'
}What it prints (run when this page was built)