title: Algorithm for scissor paper stone
body: <p>I am using the following method which works but wondering if there is a better algorithm to perform the test. Is there a better way to do it? Doing this in C# but putting syntax aside, believe the algorithm is going to be the same across OOP languages. Thank you.</p>
  
  <pre><code>public String play(int userInput)
          {   //ComputerIn is a randomly generated number between 1-3
              ComputerIn = computerInput();
  
              if (ComputerIn == userInput)
                  return "Draw";
  
              else if (ComputerIn == 1 &amp;&amp; userInput == 2)
                  return "Win";
  
              else if (ComputerIn == 2 &amp;&amp; userInput == 3)
                  return "Win";
  
              else if (ComputerIn == 3 &amp;&amp; userInput == 1)
                  return "Win";
  
              else if (ComputerIn == 1 &amp;&amp; userInput == 3)
                  return "Lose";
  
              else if (ComputerIn == 2 &amp;&amp; userInput == 1)
                  return "Lose";
  
              else
                  return "Lose";
          }
  </code></pre>