title: Is it possible to simplify an if-statement that checks for a combination?
body: <p>I'm currently working on adding sound effects to a game, and although my current code is working fine, I'm looking for a way to simplify it.
  Basically, each object in the game has a string value indicating its material (ie. "wood", "metal", etc.), and when two objects collide, a sound effect is played based on the combination. The code essentially looks like this:</p>
  
  <pre><code>if( (matA == "metal" &amp;&amp; matB == "wood") || (matA == "wood" &amp;&amp; matB == "metal") )
  {
      //play sound for metal-wood collision
  }
  </code></pre>
  
  <p>But I'm wondering if there's a way to simplify the if-statement to something like this:</p>
  
  <pre><code>if( one of the materials is wood &amp;&amp; one of the materials is metal )
  {
      //play sound for metal-wood collision
  }
  </code></pre>