コード例 #1
0
ファイル: StateMachine.cs プロジェクト: MoonJiao123/Drifters
 public StateMachine(DeltaFunction <S, A> deltaFunction, IEnumerable <S> startStates)
 {
     this.deltaFunction            = deltaFunction;
     this.startStates              = startStates;
     cursors                       = new LinkedList <S>(startStates);
     retainCursorOnDeadTransitions = false;
 }
コード例 #2
0
 public EventStateMachine(DeltaFunction <S, A> deltaFunction, ICollection <S> startStates) : base(deltaFunction, startStates)
 {
     stateActions             = new StateDictionary <S, ActionInfo>(deltaFunction.States);
     transitionActions        = new TransitionDictionary <S, A, ActionInfo>(deltaFunction.States, deltaFunction.Alphabet);
     invokeEnterActionsOnJump = true;
     invokeExitActionsOnJump  = true;
 }
コード例 #3
0
ファイル: StateMachine.cs プロジェクト: MoonJiao123/Drifters
 public StateMachine(DeltaFunction <S, A> deltaFunction, params S[] startStates) : this(deltaFunction, (IEnumerable <S>)startStates)
 {
 }
コード例 #4
0
 public EventStateMachine(DeltaFunction <S, A> deltaFunction, params S[] startStates) : this(deltaFunction, (ICollection <S>)startStates)
 {
 }
コード例 #5
0
 public static void Add <S, A>(this DeltaFunction <S, A> deltaFunction, ValueTuple <S, A, S> tuple)
 {
     deltaFunction.Define(tuple.Item1, tuple.Item2, tuple.Item3);
 }