about summary refs log tree commit diff
path: root/Day09.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Day09.cs')
-rw-r--r--Day09.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/Day09.cs b/Day09.cs
new file mode 100644
index 0000000..0f45dfd
--- /dev/null
+++ b/Day09.cs
@@ -0,0 +1,29 @@
+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(",")}";
+        }
+    }
+}
\ No newline at end of file