SongGuess
    Preparing search index...

    Interface PersistedRoomState

    interface PersistedRoomState {
        config: {
            advancedSongFiltering: boolean;
            allowChangingAnswer: boolean;
            audioStartPosition: number | null;
            distractionsPreferSameArtist: boolean;
            endWhenAnswered: boolean;
            gameMode: "multiple_choice" | "player_picks";
            multipleChoiceAnswersCount: number;
            playerPickTimeout: number;
            roundsCount: number;
            timePerQuestion: number;
            type: "room_config";
        };
        game: PersistedGame;
        hostID?: string;
        lobby: PersistedLobby;
        players: PersistedPlayer[];
        state: "lobby"
        | "results"
        | "ingame";
    }

    Hierarchy (View Summary)

    Index
    config: {
        advancedSongFiltering: boolean;
        allowChangingAnswer: boolean;
        audioStartPosition: number | null;
        distractionsPreferSameArtist: boolean;
        endWhenAnswered: boolean;
        gameMode: "multiple_choice" | "player_picks";
        multipleChoiceAnswersCount: number;
        playerPickTimeout: number;
        roundsCount: number;
        timePerQuestion: number;
        type: "room_config";
    }

    Type Declaration

    • advancedSongFiltering: boolean

      Whether to perform advanced filtering tactics when generating the songs array. Currently just ignores parens when filtering for identical song names.

    • allowChangingAnswer: boolean

      Whether to allow changing answer in multiple choice.

    • audioStartPosition: number | null

      The music start position for a game.

      Must be a float between

      • 0.0: start of audio

      and

      • 1.0: close to end of audio (audio duration minus max play time determined by config + round padding)

      Can be null to use random position (multiple choice) / let picker decide (player picks)

    • distractionsPreferSameArtist: boolean

      Whether to prefer distractions by the same artist.

    • endWhenAnswered: boolean

      Whether to directly end the round after all players answered.

    • gameMode: "multiple_choice" | "player_picks"

      The game mode being played.

      • multiple_choice: the server selects random songs from the provided playlist and provides a multiple choice question with distractions.
      • player_picks: a player from the room picks a song for other players to guess each round. other players have to guess the song title by typing.
    • multipleChoiceAnswersCount: number

      The amount of multiple choice answers to add.

    • playerPickTimeout: number

      The amount of time a player should have to pick a song.

    • roundsCount: number

      The amount of rounds to play.

    • timePerQuestion: number

      The time per question in each round.

    • type: "room_config"
    hostID?: string
    players: PersistedPlayer[]
    state: "lobby" | "results" | "ingame"