Example #1
0
        public void BasicTests(long[] memory, long input, int expectedDiagnosticCode)
        {
            var vm = new AsyncIntCodeVm(memory);

            long[] output = vm.Execute(input);
            Assert.That(output.Last(), Is.EqualTo(expectedDiagnosticCode));
        }
Example #2
0
        public string Solve(string data)
        {
            var vm = new AsyncIntCodeVm(data);

            long[] outputs = vm.Execute(1);

            return(outputs.LastOrDefault().ToString());
        }
Example #3
0
        public string Solve(string data)
        {
            var vm = new AsyncIntCodeVm(data);

            long[] output = vm.Execute(2);

            return(output.Last().ToString());
        }