Big state machines

Joel Reymont joelr1@REDACTED
Fri Apr 15 10:55:48 CEST 2005


Dear Erlangers,

I'm implementing my poker logic as a gen_fsm behavior. I'm finding that
my FSM is getting a bit unwieldy, though, what with all the tests I have
to write for different state transitions, etc. 

I'm wondering if there's an idiomatic way of splitting big FSMs into
smaller chunks. Should I move the processing code into different modules
and leave just invocations in the FSM callback module? 

I suppose this will help with reusing states in other state machines but
would like to hear how people have been tackling this problem.

    Thanks, Joel

-- 
http://wagerlabs.com/tech





More information about the erlang-questions mailing list