title: Rock, Paper, Scissors. Determine win/loss/tie using math?
body: <p>So I was writing a rock paper scissors game when I came to writing this function:</p>
  
  <p><code>a</code> is player one's move, <code>b</code> is player two's move. All I need to figure out is if player one won, lost, or tied.</p>
  
  <pre><code>//rock=0, paper=1, scissors=2
  processMove(a, b) {
      if(a == b) ties++;
      else {
               if(a==0 &amp;&amp; b==2) wins++;
          else if(a==0 &amp;&amp; b==1) losses++;
          else if(a==1 &amp;&amp; b==2) losses++;
          else if(a==1 &amp;&amp; b==0) wins++;
          else if(a==2 &amp;&amp; b==1) wins++;
          else if(a==2 &amp;&amp; b==0) losses++;
      }
  }
  </code></pre>
  
  <p>My question is: What's the most elegant way this function can be written?</p>
  
  <p>Edit: I'm looking for a one-liner.</p>