Day 10, puzzle 2

This commit is contained in:
jazzpi
2022-12-15 16:26:34 +01:00
parent 05f3d9411a
commit b7005f244d
2 changed files with 53 additions and 3 deletions

14
src/bin/d10p2.rs Normal file
View File

@ -0,0 +1,14 @@
use aoc22::{day10, util};
pub fn main() {
let instructions = day10::parse_instructions(&util::parse_input());
let mut cpu = day10::CPU::new(instructions);
let mut crt = day10::CRT::new();
for _ in 0..240 {
crt.render(&cpu);
cpu.do_cycle().expect("No more instructions?");
}
crt.draw();
}