Пример #1
0
        public static RamMachineRuntime Run(IEnumerable <RamMachineCommand> code, params long[] input)
        {
            var runtime = new RamMachineRuntime(code);

            runtime.DoUntillEnd();
            runtime.Input(((IEnumerable <long>)input) ?? Enumerable.Empty <long>());
            return(runtime);
        }
Пример #2
0
 public RamMachineOutputArgs(RamMachineRuntime runtime, long newestValue)
 {
     Runtime     = runtime;
     NewestValue = newestValue;
 }