Reference · Rules, solvers and generation
TsunagiGameOptionstype
What a game is told when it starts.
Import it
import type { TsunagiGameOptions } from "@johnmorrisdotca/tsunagi";
Definition
type TsunagiGameOptions = {
answer?: string;
explosions?: TsunagiExplosionChoice;
cheats?: boolean;
lines?: Lines;
};
Members
| Name | Type | Description |
|---|---|---|
answer (optional) | string | undefined | The board's one answer, as a code. With it, a solve must be that answer and Cheat is possible; without it, any full, joined board is a solve. |
explosions (optional) | TsunagiExplosionChoice | undefined | Explosions as made (the default), softened or off. |
cheats (optional) | boolean | undefined | Whether Cheat is offered. Default false. |
lines (optional) | Lines | undefined | Lines to start from, to carry on a game kept half-played ( |
Examples
import { TSUNAGI_4 } from "@johnmorrisdotca/tsunagi/levels-4";
import type { TsunagiGameOptions } from "@johnmorrisdotca/tsunagi";
const answer = TSUNAGI_4[0][1];
const value: TsunagiGameOptions = {answer,cheats:true};
console.log(value);{ answer: 'AAAABBBBCCCCDDDD', cheats: true }What it prints (run when this page was built)