Something went wrong. Try again.
Code for the Advent of Code event
aoc advent-of-code
Something went wrong. Try again.
375 B · 24 lines
Ruby
at rust
12345678910111213141516171819202122232425#!/usr/bin/env ruby# frozen_string_literal: true
require_relative '../../../lib/aoc/intcode/cpu'
path = ARGV.first || 'input'solve = ARGV.last || path == 'input'cpu = AoC::Intcode::CPU.newcpu.load!(path)
cpu.debug!(true) if ENV['DEBUG']
cpu2 = cpu.dup
cpu.input!(1) if solve
cpu.run!
cpu2.input!(2).run! if solve
if ENV['DEBUG'] require 'pry' binding.pryend