about summary refs log blame commit diff
path: root/Day09.cs
blob: 0f45dfd40ef8008639d3c8a195c04d2144df9209 (plain) (tree)
1
2
3
4
5
6
7
8
9
                  
                  


                 
                                     
     

                                      
                                                
         
                                              

         
                                         





                                                         
                                         





                                                         
 
using System.Linq;
using aoc2019.lib;

namespace aoc2019
{
    internal sealed class Day09 : Day
    {
        private readonly IntCodeVM vm;

        public Day09() : base(9, "Sensor Boost")
        {
            vm = new IntCodeVM(Input.First());
        }

        protected override string Part1()
        {
            vm.Reset();
            vm.Run(1);
            return $"{vm.output.ToDelimitedString(",")}";
        }

        protected override string Part2()
        {
            vm.Reset();
            vm.Run(2);
            return $"{vm.output.ToDelimitedString(",")}";
        }
    }
}