title: Java + rock paper scissors game + OOP(?)
body: <p>I have an assignment to make a rock paper scissors game that will allow the user to input "R, P, S, or Q to quit." If user enters Q to quit, it must display the wins and losses and in percentage format. I tried dabbling with inheritance, but I made this in case I don't find a more efficient, probably more OOP way to go about this. </p>
  
  <p><strong>My question is:</strong> Is there a quicker, more efficient way to code this? OOP seems like it could work, but it doesn't have to be.</p>
  
  <pre><code>// main method
  public static void main(String[] args) 
  {
      Scanner scan = new Scanner(System.in);
  
      // variables
      double wins = 0;
      double losses = 0;
      double draws = 0;
      double games = 0;
      Integer answer1 = null;
  
      boolean playing = true;
  
      // start of game
      while (playing) 
      {
          // main menu
          System.out.println("Input R, P, S, or Q(to quit).");
          String answer = scan.next();
  
          // player's move
          answer = answer.toLowerCase();
  
          // computer's move
          Random random = new Random();
          Integer choice = random.nextInt(3); // n-1
          String comp = choice.toString();
          System.out.println(comp);
  
          // converts player's move from str to int
          switch (answer)
          {
          case "r":
              answer1 = 0;
              break;
          case "p":
              answer1 = 1;
              break;
          case "s":
              answer1 = 2;
              break;
          case "q":
              System.out.println("User exit.");
              double winP = wins/games*100;
              double loseP = losses/games*100;
              double drawP = draws/games*100;
  
              System.out.println("Wins: " + wins);
              System.out.printf("%.2f", winP);
              System.out.println(" Percent");
              System.out.println("Losses: " + losses);
              System.out.printf("%.2f", loseP);
              System.out.println(" Percent");
              System.out.println("Draws: " + draws);
              System.out.printf("%.2f", drawP);
              System.out.println(" Percent");
              answer1 = null;
              playing = false;
              break;
          }
  
          // checks for conditions
          // draw
          if (playing == true) 
          {
              if (answer1 == choice)
              {
                  System.out.println("Draw");
                  draws++;
                  games++;
              }
              // losses
              if (answer1 == 0 &amp;&amp; choice == 1)
              {
                  System.out.println("YOU LOSE! :D");
                  losses++;
                  games++;
              }
              if (answer1 == 1 &amp;&amp; choice == 2)
              {
                  System.out.println("YOU LOSE! :D");
                  losses++;
                  games++;
              }
              if (answer1 == 2 &amp;&amp; choice == 0)
              {
                  System.out.println("YOU LOSE! :D");
                  losses++;
                  games++;
              }
              // wins
              if (answer1 == 0 &amp;&amp; choice == 2)
              {
                  System.out.println("you win... :D");
                  wins++;
                  games++;
              }
              if (answer1 == 1 &amp;&amp; choice == 0)
              {
                  System.out.println("you win... :D");
                  wins++;
                  games++;
              }
              if (answer1 == 2 &amp;&amp; choice == 1)
              {
                  System.out.println("you win... :D");
                  wins++;
                  games++;
              }
          }           
      }
  }
  </code></pre>