Design Pattern problem involving N states and transitions between them
问题 I have a problem at hand and I am not getting which design pattern to use. The problem goes as such: I have to build a system which has 'N' states and my system has to do a transition from any state to any other state depending on some conditions. Ex: On condition 1, movement from State 1 to 3 and on condition 2 from state 1 to 4. Even the transition from one state to other state can be done on 2 or more different conditions. For example, transition from State 1 to state 3 can be done when: