I'm trying to think of an elegant way to model three state machines that work in concert with one another. For example, say we have these three machines like:
Machine One
A ---> B -.
^ |
| v
D <------ C
Machine Two,
E <--> F
and Machine Three,
H --> I <--> J
and we we want to write code where Machine One can only transition to state B
if Machine Two is in state E
and Machine Three is in state I
or J
. There could be many other rules like that.
Being new to C++, I'm wondering what could be most elegant way to model this kind of behavior of multiple state machines working in concert.
Aucun commentaire:
Enregistrer un commentaire