Browse Source

Update to run with input

ApisNecros 1 year ago
parent
commit
4355b7bb20
1 changed files with 2 additions and 2 deletions
  1. 2 2
      2/2_1.js

+ 2 - 2
2/2_1.js

@@ -10,7 +10,7 @@ const demos = [
     [1, 1, 1, 4, 99, 5, 6, 0, 99],
     [1, 1, 1, 4, 99, 5, 6, 0, 99],
 ];
 ];
 
 
-const computer = new Computer(demos[0]);
+const computer = new Computer(input);
 computer.Run();
 computer.Run();
-console.log(computer.stack.Get(0));
+console.log(computer.stack.GetAtIndex(0, 1));
 // computer.DumpMemory();
 // computer.DumpMemory();