I am very anti-nested-while loop in games. I find it to be ugly and hard to maintain. I find creating some form of state machine creates order from this kind of chaos. I'll save you my speech because i could of sworn i gave it to you before about this very thing.
Recommended Tutorials: