This is a very simple implementation of a generic state machine for helping me to illustrating the concept to aspiring game developers