13_1.js 417 B

123456789101112131415
  1. const fs = require("node:fs");
  2. const { render } = require("./common");
  3. const Computer = require("../IntComp/Computer");
  4. // Load and parse the input
  5. const input = fs.readFileSync("./13/input.dat", "utf8")
  6. .split(",")
  7. .map((x) => parseInt(x, 10));
  8. const sampleInput = [104, 1, 104, 2, 104, 3, 104, 6, 104, 5, 104, 4, 99];
  9. const arcade = new Computer(input);
  10. arcade.Run();
  11. render(arcade.outputValues, true);