SongGuess
    Preparing search index...

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    • Parameters

      • Optionalmsg: {
            advancedSongFiltering: boolean;
            audioStartPosition: number;
            distractionsPreferSameArtist: boolean;
            endWhenAnswered: boolean;
            gameMode: "multiple_choice" | "player_picks";
            playerPickTimeout: number;
            roundsCount: number;
            timePerQuestion: number;
            type: "room_config";
        }
        • 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"

      Returns BaseConfig

    Properties

    advancedSongFiltering: boolean = true

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

    audioStartPosition: number = 3

    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 = true

    Whether to prefer distractions by the same artist.

    endWhenAnswered: boolean = false

    Whether to directly end the round after all players answered.

    gameMode: "multiple_choice" | "player_picks" = "multiple_choice"

    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 = 180

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

    roundsCount: number = 10

    The amount of rounds to play.

    timePerQuestion: number = 25

    The time per question in each round.

    type: "room_config"

    Methods

    • Applys a RoomConfigMessage to this config instance.

      Parameters

      • msg: {
            advancedSongFiltering: boolean;
            audioStartPosition: number;
            distractionsPreferSameArtist: boolean;
            endWhenAnswered: boolean;
            gameMode: "multiple_choice" | "player_picks";
            playerPickTimeout: number;
            roundsCount: number;
            timePerQuestion: number;
            type: "room_config";
        }

        the message to apply.

        • 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"

      Returns void

    • The tick count when a question song was picked.

      Returns number

    • The tick count when a new round shall be started.

      Returns number

    • Constructs a configuration update message.

      Returns {
          advancedSongFiltering: boolean;
          audioStartPosition: number;
          distractionsPreferSameArtist: boolean;
          endWhenAnswered: boolean;
          gameMode: "multiple_choice" | "player_picks";
          playerPickTimeout: number;
          roundsCount: number;
          timePerQuestion: number;
          type: "room_config";
      }

      a JSON string of the constructed RoomConfigMessage

      • 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"