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

    Interface NoteExpressGameProps

    Props for NoteExpressGame.

    interface NoteExpressGameProps {
        collectionStore?: CollectionStore;
        colors?: Partial<GameColors>;
        expressLabels?: Partial<NoteExpressLabels>;
        game?: string;
        instructions?: false | GameInstructions | readonly GameInstructions[];
        labels?: Partial<GameLabels>;
        levels?: number;
        mascot?: false | MascotName;
        mode?: ExpressMode;
        onAnother?: () => void;
        onContinue?: () => void;
        onError?: (error: Error) => void;
        onLevelChange?: (level: number) => void;
        onModeChanged?: (mode: ExpressMode) => void;
        onResult?: (result: GameResult) => void;
        onTrainCompleted?: (summary: DeckSummary, points: number) => void;
        onWagonCollected?: (wagon: ExpressWagon, isNew: boolean) => void;
        penaltySeconds?: number;
        player?: { id: string; name?: string };
        resultStore?: ResultStore;
        retryUntilRight?: boolean;
        samples?: SampleSource;
        scene?: ExpressScene;
        seed: number;
        settings: DeckSettings;
        shellLabels?: Partial<GameShellLabels>;
        showInstructionsFirst?: boolean;
        showScore?: boolean;
        sounds?: boolean;
        speak?: (text: string) => void | Promise<void>;
        subtitle?: string;
        sx?: SxProps<Theme>;
        timer?: number | false;
        title?: string;
        wagonBook?: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    collectionStore?: CollectionStore

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

    colors?: Partial<GameColors>
    expressLabels?: Partial<NoteExpressLabels>
    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<GameLabels>
    levels?: number

    How many levels the pills offer (default: 5)

    mascot?: false | MascotName

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

    How the wagons are hooked: 'catch' — the signboard shows a note on its staff and every wagon carrying it is tapped to hook it; 'play' — each wagon's note is played on the keys along the platform edge as it rolls by. The Ready screen offers both unless the deck fixes one (cards played on the keys, or ones that can only be hooked by sight — by ear, signs, values, key signatures). Default: hooking by sight at levels 1 and 2, playing from level 3

    onAnother?: () => void
    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
    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

    onModeChanged?: (mode: ExpressMode) => void

    The player chose how to hook the wagons on the Ready screen

    onResult?: (result: GameResult) => void

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

    onTrainCompleted?: (summary: DeckSummary, points: number) => void

    The game ended: the train full or the sun set — how the trains went (every train counted, those the sun set on as missed), and the total points the End screen shows: the trains' points and the hook bonus

    onWagonCollected?: (wagon: ExpressWagon, isNew: boolean) => void

    A full train won its wagon design for the wagon book: isNew the first time

    penaltySeconds?: number

    Seconds a wrong wagon takes off the clock (default: from 1 at level 1 to 4 at level 5)

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

    Who is playing, stamped on results

    resultStore?: ResultStore

    Where results go; nothing is kept without it

    retryUntilRight?: boolean

    After a wrong wagon, keep hooking the train until its wagons are all hooked (default: true)

    samples?: SampleSource

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

    scene?: ExpressScene

    Where the railway runs: the Key Meadow by day (default), out of a rocky tunnel with lanterns ('cave'), or over a stone viaduct among the mountains ('summit'); the sun sets as the clock runs in each

    seed: number
    settings: DeckSettings

    A deck of catch cards, each a wave of wagons with several to hook (one hooked byEar is a wave of singing wagons); its level sets the waves — how many wagons, how fast, how often a golden wagon comes, how long the sun stays up — as well as what the wagons carry

    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
    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>
    timer?: number | false

    Seconds the sun stays up — the clock — or false for no clock. By default it is set from the level and the number of waves: from 24 seconds a wave at level 1 down to 13 at level 5

    title?: string

    The game's name over the railway

    wagonBook?: boolean

    Show the wagon book: its button on the Ready screen and the wagon design won on the End screen (default: true)