コード例 #1
0
 private IntCodeComputer(IntCodeComputer copyFrom)
 {
     _inputChannel   = new Queue <long>(copyFrom._inputChannel);
     _outputChannel  = new Queue <long>(copyFrom._outputChannel);
     _programCounter = copyFrom._programCounter;
     _relativeBase   = copyFrom._relativeBase;
     _ticks          = copyFrom._ticks;
     Program         = copyFrom.Program.Clone();
 }
コード例 #2
0
 public IntCodeComputer(IEnumerable <long> program)
 {
     Program = new VirtualMemory(program);
 }