15 lines
331 B
Rust
15 lines
331 B
Rust
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();
|
|
}
|