Okay so im trying to create a game were the user has 3 guesses to guess the sequence, RBR, and i'm trying to use a while loop to enable the program to stop once the variable loopVal is over 0 (i.e. when the user gets the sequence right), but i cannot get it to work, any help? Thanks in advance.

//Code for guesses

```
  Scanner keyboard = new Scanner(System.in);
  int loopVal = 0;

  while (loopVal < 1){

     System.out.println("Please enter your first guess:");
     String userGuess1 = keyboard.nextLine().toUpperCase();
     if (userGuess1.equals(CORRECT_ANSWER))
     {
        System.out.println("Congratulations you got it on your first try!");
        loopVal++;
     } else
     {
        System.out.println("Sorry that's not right correct, you have 1 guess left");
     }

     //Code for second guess
     System.out.println("Please enter your second guess:");
     String userGuess2 = keyboard.nextLine().toUpperCase();

     if (userGuess2.equals(CORRECT_ANSWER))
     {
        System.out.println("Congratulations you got it on your second try!");
        loopVal++;
     } else
     {
        System.out.println("Sorry that's not right correct, you have 1 guess left");
     }

     //Code for third and final guess
     System.out.println("Please enter your final guess:");
     String userGuess3 = keyboard.nextLine().toUpperCase();

     if (userGuess3.equals(CORRECT_ANSWER))
     {
        System.out.println("Congratulations you got it on your last try!");
        loopVal++;
     } else
     {
        System.out.println("Sorry you didn't get it this time! Play again?");
     }

  }'

```