Implementation of classic game state machine, with transitions isolated from the states methods.