Please spot the flaw in my logic (random integer in range)

Every time you’re checking that variable it’s generating a new random integer. So it’s a different number at every branch. Meaning it could be 0, 1, 2 at the last branch.

You should promote the result of Random Integer in Range to a local variable before the first branch. And then compare that variable, instead of the output of the random node.