[Tutor] what's a state machine?
Jeff Shannon
jeff at ccvcorp.com
Wed Aug 6 16:49:46 EDT 2003
R. Alan Monroe wrote:
>>You then define numeric values(or hash keys) for each state
>>and each event, load pointers/rferences to functions into
>>the action column
>>
>>
>
>Does that work when you have multiple concurrent states, like
>simultaneouly Walking and ChewingGum at the same time?
>
>
Yes, if you define a states walking, chewing_gum, and
walking_and_chewing_gum. Any valid combination of other states can be
seen as a single state itself. This could lead to a combinatoric
explosion in the number of possible states, and may not be the most
efficient way to implement the state machine, but it can be done.
Jeff Shannon
Technician/Programmer
Credit International
More information about the Tutor
mailing list