cr0sh
Member
I would do one thing to Crsh0's code and that would be to make the "states" an enumerated type. That way the state machine could be coded with descriptive state names. Thus, readibility could be maintained while using structured methods.
I fully agree - in a real application, this would be the proper thing to do...