SongGuess
    Preparing search index...

    Interface PersistedServerState

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

    Hierarchy (View Summary)

    Index

    Properties

    config: {
        advancedSongFiltering: boolean;
        audioStartPosition: number;
        distractionsPreferSameArtist: boolean;
        endWhenAnswered: boolean;
        gameMode: "multiple_choice" | "player_picks";
        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.

    • audioStartPosition: number

      The music start position.

      • 0: start of audio
      • 1: close to middle of audio
      • 2: close to end of audio
      • 3: random of the above

      Used as default value in PlayerPicksGame, used as forced position in MultipleChoiceGame.

    • 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.
    • 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
    name: string
    players: PersistedPlayer[]
    state: "lobby" | "results" | "ingame"
    version: number