By canceling your comment on @LeoCorrea, your conditions appear to be logical.
Maybe try something like:
final int PLAYER_BUST = 1 << 0; final int DEALER_BUST = 1 << 1;
1 << x is equal to 2 ^ x, and | - bitwise OR. My example is for n = 2, but n can be any reasonable number.
This is something like PHP encodes its error levels . Notice how most levels are represented in degrees 2 (with only one digit “1” in binary format).
We use | at these levels to get the combined result of n Booleans. Each bit in int total represents one of the conditions.
Since there are 2 ^ n possible combined outcomes of n Boolean ones, we can match each result with an integer of n bits. We cannot include n logical elements, but, fortunately, we can use switch for this integer total , which represents n Boolean elements.
source share