title: Java Loop control (while)
body: <pre><code>    int levelP1;
      int levelP2;
      do {
          p1.startTurn(p1, d1);
          p2.startTurn(p2, d1);
          levelP1 = p1.getLevel();
          levelP2 = p2.getLevel();
      } while (levelP1 &lt;= 10 || levelP2 &lt;= 10);
      if (levelP1 &gt;= 10) {
          System.out.println(p1.getName() + " hit LvL " + levelP1 + " and WON the game !");
      } else if (levelP2 &gt;= 10) {
          System.out.println(p2.getName() + " hit LvL " + levelP2 + " and WON the game !");
      }
  </code></pre>
  
  <p>I have this pieace of code which is not doing what it is intended... 
  the "startTurn()" method might or might not level up the player, depending of what happens inside of it...
  I want it to exit the loop when either player hits level 10 or above... Cannot figured out how. please help</p>