Exemplo n.º 1
0
        public TuringMachine.Instruction getInstructionsForStateAndSymbol(TuringMachine.State state, char symbol)
        {
            int symbolAsIndex = symbol - '0';

            ITuple instructionsForState = getInstructionsForState(state);

            return((Instruction)instructionsForState[symbolAsIndex]);
        }
Exemplo n.º 2
0
 private ValueTuple <Instruction, Instruction> getInstructionsForState(TuringMachine.State state)
 {
     instructions.TryGetValue(state, out var instructionsForState);
     return(instructionsForState);
 }