Hiyve Components - v1.0.0
    Preparing search index...

    Interface PotionLabGameProps

    Props for PotionLabGame.

    interface PotionLabGameProps {
        collectionStore?: CollectionStore;
        game?: string;
        instructions?: false | GameInstructions | readonly GameInstructions[];
        labels?: Partial<PotionLabLabels>;
        levels?: number;
        mascot?: false | MascotName;
        onAnother?: () => void;
        onContinue?: () => void;
        onError?: (error: Error) => void;
        onLabCompleted?: (summary: DeckSummary) => void;
        onLevelChange?: (level: number) => void;
        onPotionCollected?: (bottle: PotionBottle, isNew: boolean) => void;
        onResult?: (result: GameResult) => void;
        player?: { id: string; name?: string };
        potionBook?: boolean;
        resultStore?: ResultStore;
        samples?: SampleSource;
        seed: number;
        settings: Partial<PotionSettings>;
        shellLabels?: Partial<GameShellLabels>;
        showInstructionsFirst?: boolean;
        showScore?: boolean;
        sounds?: boolean;
        speak?: (text: string) => void | Promise<void>;
        subtitle?: string;
        sx?: SxProps<Theme>;
        title?: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    collectionStore?: CollectionStore

    Where the potion book is kept, one collection per player; without one it lasts as long as the page

    game?: string

    The game's name, stamped on its results (default: the kinds of its cards)

    instructions?: false | GameInstructions | readonly GameInstructions[]

    How to play, shown from the help button and on first play (default: made from the kinds of cards; false hides the help button)

    labels?: Partial<PotionLabLabels>
    levels?: number

    How many levels the pills offer (default: 5)

    mascot?: false | MascotName

    The mascot who reacts to answers (default: 'owl'; false for none)

    onAnother?: () => void

    New orders from the End screen: deal another seed

    onContinue?: () => void

    Onward from the End screen (back to a map, say): a button with a forward arrow, the main one

    onError?: (error: Error) => void
    onLabCompleted?: (summary: DeckSummary) => void

    The lab closed — every order brewed, or the candle burned out: how the orders went

    onLevelChange?: (level: number) => void

    Level pills on the Ready screen: a pill was chosen (the host deals the game again at that level). The pills show only when this is given

    onPotionCollected?: (bottle: PotionBottle, isNew: boolean) => void

    A potion brewed right went into the potion book: isNew the first time

    onResult?: (result: GameResult) => void

    A result was made, whether or not a store kept it

    player?: { id: string; name?: string }

    Who is playing, stamped on results

    potionBook?: boolean

    Show the potion book: its button on the Ready screen and the potions brewed on the End screen (default: true)

    resultStore?: ResultStore

    Where results go; nothing is kept without it

    samples?: SampleSource

    Recorded piano samples for the notes the cards play (see UseGameSoundsOptions); without them a small built-in voice plays

    seed: number
    settings: Partial<PotionSettings>

    The session: its level (1–5) sets what is brewed, the tries and the candle together; topic keeps to chords or to keys; orders and rareOrders how many

    shellLabels?: Partial<GameShellLabels>

    The shell's words: the HUD, the Ready and End screens, How to play

    showInstructionsFirst?: boolean

    Show how to play before the first card (default: false)

    showScore?: boolean

    Show points, stars and streak as the game goes (default: true)

    sounds?: boolean

    Sound on (default: true); a mute button in the HUD silences it as the game goes on

    speak?: (text: string) => void | Promise<void>

    Your own recordings for How to play's words (see useReadAloud)

    subtitle?: string

    A line under the title

    sx?: SxProps<Theme>
    title?: string

    The game's name over the lab