title: Swift - Multiple Switch Cases
body: <p>I am making a board game where you must joins two objects. Each object has a type and there are 5 different types. For each different type combination in a merge, there will be a different effect on the game. Right now, I am working with a switch statement for each combination. So, my code would look something like this.</p>
  
  <pre><code>struct Coin {
      var type = 1
  }
  
  // Each coin is of type Coin.   
  switch(coin1.type, coin2.type) {
      case (1,1):
          functionNormal()
      case (1,2):
          functionUncommon()
      case (1,3):
          functionRare()
      ...
  }
  </code></pre>
  
  <p>The objects' position doesn't change the result. A (1,2) merge will have the same effect as a (2,1) merge. Is there a less verbose way to achieve this?</p>