Reference · Boards, rules and challenges
ChallengePacktype
Curated goal choices for one supported board shape.
Import it
import type { ChallengePack } from "@johnmorrisdotca/tobiishi";
Definition
type ChallengePack = Readonly<{
title: Readonly<Record<"en" | "ja", string>>;
shape: Shape;
goals: readonly GoalHole[];
}>;
Members
| Name | Type | Description |
|---|---|---|
title | Readonly<Record<"en" | "ja", string>> | |
shape | Shape | |
goals | readonly Readonly<{ id: string; names: Readonly<Record<"en" | "ja", string>>; x: number; y: number; }>[] |
Examples
import type { ChallengePack } from "@johnmorrisdotca/tobiishi";
import { TOBIISHI_CHALLENGE_PACKS } from "@johnmorrisdotca/tobiishi";
const value: ChallengePack = TOBIISHI_CHALLENGE_PACKS.english;
console.log(value);{
title: { en: 'Crossroads', ja: '交差点' },
shape: 'english',
goals: [
{ id: 'centre', names: [Object], x: 3, y: 3 },
{ id: 'north', names: [Object], x: 3, y: 2 },
{ id: 'west', names: [Object], x: 2, y: 3 }
]
}What it prints (run when this page was built)