about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/IntCodeVM.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/IntCodeVM.cs b/lib/IntCodeVM.cs
index f7699c6..b42a907 100644
--- a/lib/IntCodeVM.cs
+++ b/lib/IntCodeVM.cs
@@ -12,12 +12,12 @@ namespace aoc2019.lib
         private readonly long[] program;
         public Queue<long> input, output;
 
-        public IntCodeVM(IEnumerable<long> tape)
+        public IntCodeVM(string tape)
         {
             i = 0;
             relbase = 0;
-            program = tape.ToArray();
-            memory = tape.ToArray();
+            program = tape.Split(',').Select(long.Parse).ToArray();
+            memory = program;
             input = new Queue<long>();
             output = new Queue<long>();
         }