Added wildcard support for events source, final state definition
Props go to @ctbk for the features.
Now you can define events which are valid in every state of the FSM, by using src='*'
in the event definition or even by omitting the src
attribute.
If you define the final
state of the state machine, the shorthand method is_finished()
returns true if the machine is in that particular state.
Both features are ported from Jake Gordon's FSM.