Consider a boolean array with four elements. Initially, all elements are false. The do-while loop will execute some tests and change each element's state until until all four elements are true.
boolean[] pickedSuits = new boolean[4];
do {
...some testing...
} while (pickedSuits[0] != true && pickedSuits[1] != true && pickedSuits[2] != true && pickedSuits[3] != true);
Is there a Java way to compare a range of elements instead of testing each one individually? I'm thinking without a for-loop, something like:
while (pickedSuits[0-3] != true);