A super simple (and flexible) Finite State Machine class in 30 lines of C++