예제 #1
0
        // delegate i/o
        public IntCode(string instanceName, long[] code, IntCodeInput inputDelegate, IntCodeOutput outputDelegate)
        {
            SetCode(instanceName, code);

            InputDelegate  = inputDelegate;
            OutputDelegate = outputDelegate;
        }
예제 #2
0
        // delegate i/o
        public IntCode(string instanceName, long[] code, IntCodeInput inputDelegate, IntCodeOutput outputDelegate)
        {
            InstanceName = instanceName;

            Code = new long[code.Length * 10]; // extra space at end
            code.CopyTo(Code, 0);

            InputDelegate  = inputDelegate;
            OutputDelegate = outputDelegate;
        }
예제 #3
0
 public void SetNewInputDelegate(IntCodeInput inputDelegate)
 {
     InputDelegate = inputDelegate;
 }