title: Compiling Error: Missing return statement
body: <p>This program plays craps with 3 different methods. I need help in playing craps but i'm required to have these 3 different methods but for some reason every time I compile I am getting this error:</p>
  
  <pre><code>CrapsAnalysis.java:48: error: missing return statement
      }
      ^
  1 error
  Process javac exited with code 1
  </code></pre>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>public class CrapsAnalysis
  {   
  public static int rollDie( int n) {
      return (int)(Math.random()*n) + 1 ;
  }
  public static int rollDice( ) {
      return rollDie(6) + rollDie(6) ;
  }
  public static boolean playOneGame( ) {
      int newDice = rollDice();
      int roll = rollDice(); //first roll of the dice
      int playerPoint = 0; //player point if no win or loss on first roll
      if (roll == 7 || roll == 11)
          return true;
      else if (roll == 2 || roll == 3 || roll == 12)
          return false;
      else    
          playerPoint = roll;
      do {
          if (rollDice() == 7)
              return false;
          else if (rollDice() == playerPoint) 
              return true;
          else
              newDice = rollDice();
          } while (rollDice() != playerPoint || rollDice() != 7) ;
      }
  }
  </code></pre>