about summary refs log blame commit diff
path: root/Day9.cs
blob: 56988f63d4e747d0e08ef04d548837d170e9e3b2 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
                  










                                           
                                              
















                                                         
using aoc2019.lib;
using System.Linq;

namespace aoc2019
{
    internal class Day9 : Day
    {
        public override int DayNumber => 9;
        private readonly IntCodeVM vm;

        public Day9()
        {
            vm = new IntCodeVM(Input.First());
        }

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

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