Use a Popular Concept: FSM
Finite State Machines
- Transition from State to next State
- Triggered by events
- Execute actions during the transition
- (SDL state machines are “at rest” while in states, do their job during transitions)
Extended
- Handle local variables
- Use local variables to guard transitions
Communicating
- Respond to signals from other processes (signals = events)
- Send signals to other processes