private static void ProcessFSM <TInput, TOutput>(IFSM <TInput, TOutput> fsm) where TInput : FSMAtomBase, IStringKeyable where TOutput : FSMAtomBase, IStringKeyable { Console.WriteLine(); Console.Write("\t"); foreach (var state in fsm.StateSet) { Console.Write("{0}\t", state.StateCore.ToString()); } Console.WriteLine(); foreach (var input in fsm.InputSet) { Console.Write("{0}\t", input.KeyName); foreach (var state in fsm.StateSet) { Console.Write("{0}({1})\t", fsm.ProcessInput(state, input), fsm.CurrentState); } Console.WriteLine(); } }