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

    Props for MusicGame.

    interface MusicGameProps {
        background?: string;
        collectionStore?: CollectionStore;
        colors?: Partial<GameColors>;
        defaultLevel?: number;
        defaultTopic?: PracticeTopicId | null;
        game: string | MusicGameDef;
        games?: readonly MusicGameDef[];
        labels?: Partial<MusicGameLabels>;
        level?: number;
        onBack?: () => void;
        onError?: (error: Error) => void;
        onLevelChange?: (level: Level) => void;
        onResult?: (result: GameResult) => void;
        onSeedChange?: (seed: number) => void;
        onTopicChange?: (topic: PracticeTopicId | null) => void;
        player?: { id: string; name?: string };
        resultStore?: ResultStore;
        retryUntilRight?: boolean;
        samples?: SampleSource;
        seed?: number;
        showInstructionsFirst?: boolean;
        sounds?: boolean;
        sx?: SxProps<Theme>;
        topic?: PracticeTopicId | null;
        topics?: readonly PracticeTopic[];
    }
    Index

    Properties

    background?: string

    Behind the game: any CSS background (default: the game's colour glowing over a deep navy) — 'transparent' to show the host's own

    collectionStore?: CollectionStore

    Where what is won — a train's wagons, a sky, a band member, a potion — is collected

    colors?: Partial<GameColors>

    The cards' colours: right, wrong, the staff, a choice

    defaultLevel?: number

    The level to start on when the game keeps it (default: 1)

    defaultTopic?: PracticeTopicId | null

    The topic to start on when the game keeps it (default: null, its own cards)

    game: string | MusicGameDef

    The game to play: an entry, or its id in games

    games?: readonly MusicGameDef[]

    Where an id is looked up (default: defaultMusicGames)

    labels?: Partial<MusicGameLabels>
    level?: number

    The level played, 1 to the game's levels, when the host keeps it

    onBack?: () => void

    A back button before the level buttons, calling this

    onError?: (error: Error) => void
    onLevelChange?: (level: Level) => void

    Called when the player picks another level

    onResult?: (result: GameResult) => void

    Called with each finished game's result

    onSeedChange?: (seed: number) => void

    Called with a new seed when the player asks for a new game

    onTopicChange?: (topic: PracticeTopicId | null) => void

    Called with null when the player goes back to the game's own cards (the topic chip's close button)

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

    Who is playing, kept with each result

    resultStore?: ResultStore

    Where each finished game's result is saved

    retryUntilRight?: boolean

    After a wrong answer, another go at the same card, where the game plays that way (default: true)

    samples?: SampleSource

    Recorded instrument samples for the notes, from a host you choose; without it a small built-in voice plays

    seed?: number

    The seed the game is dealt from, when the host keeps it; a new seed is a new game

    showInstructionsFirst?: boolean

    Open the how-to-play help before the first card (default: true)

    sounds?: boolean

    Sounds on (default: true)

    sx?: SxProps<Theme>
    topic?: PracticeTopicId | null

    The Practice topic whose cards it plays, or null for its own, when the host keeps it

    topics?: readonly PracticeTopic[]

    The topics a pointed game names (default: practiceTopics)