Exemplo n.º 1
0
 private static void ApplyOperation(StateValueOperations operation, BinaryTape tape, ref int position,
                                    out StateMachineState state)
 {
     tape[position] = operation.WriteValue;
     if (operation.TapeShiftDirection == Direction.Left)
     {
         position--;
     }
     else
     {
         position++;
     }
     state = operation.ContinueWithState;
 }
Exemplo n.º 2
0
 public StateOperation(StateMachineState state, StateValueOperations operationsOnZero, StateValueOperations operationsOnOne)
 {
     State            = state;
     OperationsOnZero = operationsOnZero;
     OperationsOnOne  = operationsOnOne;
 }