rustfmt
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
fn do_cycle(cycle: u64, x_reg: i64) {
|
||||
let col = (cycle - 1) % 40;
|
||||
|
||||
|
||||
// println!("{} <= ")
|
||||
if x_reg - 1 <= col.try_into().unwrap() && x_reg + 1 >= col.try_into().unwrap() {
|
||||
print!("#");
|
||||
} else {
|
||||
print!(".");
|
||||
}
|
||||
|
||||
|
||||
if col == 39 {
|
||||
println!();
|
||||
}
|
||||
@ -23,9 +23,7 @@ fn main() {
|
||||
|
||||
do_cycle(cycles, x_reg);
|
||||
|
||||
|
||||
for line in INPUT.lines() {
|
||||
|
||||
if line.starts_with("noop") {
|
||||
cycles += 1;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user