Hey, thank you so much for playing and for taking the time to write this feedback!
You're right about the break statements not working properly. I think the problem is they only break out of their own scope regardless of whether that scope is a loop or not - so in this case it just breaks out of the if statement and stops there, instead of going all the way and breaking out of the loop.