W
wudehui2006
Hi I have a question. I have implemented a state machine by singleton
design. Now I change my algorithm, so I will have two state machines
which transtions diagrams are about the same, however at each state
they perform different functions. I could have two classes, with the
same transtion but different functions for each states, but it sounds
so stupid. What kind of design patterns are good for this situation?
Thank you very much!
design. Now I change my algorithm, so I will have two state machines
which transtions diagrams are about the same, however at each state
they perform different functions. I could have two classes, with the
same transtion but different functions for each states, but it sounds
so stupid. What kind of design patterns are good for this situation?
Thank you very much!