title: Hangman while loop not working with ||
body: <p>I have the following while-loop for a game of Hangman I'm working on:</p>
  
  <pre><code>while(amountOfGuessesLeft &gt; 0 || !wordComplete){
          System.out.println("The word now looks like this: " + filteredWord);
          System.out.println("You have " + amountOfGuessesLeft + " guesses left");
          System.out.print("Your guess: ");
          try {
              guess = br.readLine();
          } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
          if(guess.length() == 0 || guess.length() &gt; 1){
              System.out.println("Please just type one letter. Try again.");
          }else if(wordSelected.contains(guess) || wordSelected.contains(guess.toUpperCase())){
              System.out.println("That guess is correct.");
              filteredWord = showGuess(filteredWord, wordLetters,  guess.toUpperCase().charAt(0));
              if(!filteredWord.contains("_")){
                  wordComplete = true;
              }
          }else{
              System.out.println("There are no " + guess.toUpperCase() + "'s in this word.");
              amountOfGuessesLeft--;
          }
      }
  </code></pre>
  
  <p>When the while-loop condition is just amountOfGuessesLeft > 0, everything works fine. However, when I add || !wordComplete, neither condition is applied and the loop never ends. It doesn't throw any errors either. Any help would be appreciated.</p>