Use Finite-state Machine to manage state
Introduction
Main Elements:
- States: must be limited
- Events
- Transitions: when
event 1
fromstate A
tostate B
- Actions: when
state|event|transition
changed then actaction
Use Finite-state Machine to manage state
Main Elements:
event 1
from state A
to state B
state|event|transition
changed then act action