while循环不执行,我不知道为什么

While loop not executing and I don't know why

我正在创建一个循环,但由于某种原因它没有执行。这不是无限循环

while ((aH <= 0) || (bH <= 0))
{
  // ROUND LOOP START
  System.out.println("============");
  System.out.println("  Round " + round);
  System.out.println("============");


  // A TURN START
  while (endTurn == 1)
  {
   System.out.println("==========================");
   System.out.println("  Commander " + aN + ", GO!");
   System.out.println("==========================");
   endTurn++;

  // A TURN END
  }
  endTurn--;


  // B TURN START
  while (endTurn == 1)
  {
    System.out.println("==========================");
   System.out.println("  Commander " + bN + ", GO!");
   System.out.println("==========================");
   endTurn++;

  // B TURN END
  }
  endTurn--;
  bH -= 10;

  round++;
  // ROUND LOOP END
}

System.out.println("The loop was skipped for some reason");

当我在循环中执行测试时,是这样的。

The loop was skipped for some reason

目前循环没有目的,它会有功能,但我目前担心它没有执行。有人看到问题了吗?

当我意识到我错误地使用了 while 循环时,我打了自己一巴掌。反正……已经不是问题了!无论如何谢谢!