Final answer:
You are using incorrect syntax in the if statement. Instead of 'if (diceOne && diceTwo == SENTINEL)', use 'if (diceOne == SENTINEL && diceTwo == SENTINEL)'.
Step-by-step explanation:
In your code, you are using incorrect syntax in the if statement. Instead of writing 'if (diceOne && diceTwo == SENTINEL)', you should write 'if (diceOne == SENTINEL && diceTwo == SENTINEL)'. The '==' operator is used to compare the values of two variables, while the '&&' operator is used to perform a logical 'and' operation.
Here is the corrected code:
while (true) {
println(diceOne + "," + diceTwo);
diceOne = Randomizer.nextInt(1, 6);
diceTwo = Randomizer.nextInt(1, 6);
if (diceOne == SENTINEL && diceTwo == SENTINEL) {
println(diceOne + "," + diceTwo);
break;
}
}