Finite State Machine Builder

Finite State Machine Builder is a helper class which allows for easy and clean initialization of an FSM.

  • C++

  • C#

auto fsm = grail::fsm::FiniteStateMachineBuilder(oneState, "my state machine")
                                  .AddTransition(oneState, anotherState, condition)
                                  .AddTransition(anotherState, yetAnotherState, []() { return true; })
                                  //etc.
                                  .Build();
var fsm = new Grail.FSM.FiniteStateMachineBuilder(oneState, "my state machine")
                                   .AddTransition(oneState, anotherState, condition)
                                   .AddTransition(anotherState, yetAnotherState, () => true)
                                   //etc.
                                   .Build();