mwg API
    Preparing search index...

    Function chooseSwitch

    • Whether a bench member defends better against opponentTypes than whatever is active now.

      Parameters

      • activeTypes: readonly string[]
      • bench: readonly { types: readonly string[] }[]
      • matrix: TypeMatrix
      • opponentTypes: readonly string[]

      Returns number | null

      the index into bench of the best defensive improvement, or null when nothing on the bench is a clear upgrade over staying in