Day 10, puzzle 2
This commit is contained in:
14
src/bin/d10p2.rs
Normal file
14
src/bin/d10p2.rs
Normal 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();
|
||||
}
|
||||
Reference in New Issue
Block a user