How to make this a proper state machine in c++ - Kevin Powell - Community