Hi,
I have a state machine with many states A--B--C--D--E. I have many transitions from C for example to A if some condition is verified. For every state I have a class extending abstract class Stateand I have a manager that delegates every transition method to state method. The question is "could states call directly manager transition methods?". I have seen on Internet only examples in which there is a main class that knows exactly how many times transition happens (i.e. insertQuarter(), ejectQuarter(), turnCrank(), dispense()).
The only way I found to do this is to call manager transition methods in states. Is this wrong or bad practice?
Thanks in advance Tobia