Remove excess output

This commit is contained in:
Daniel Flanagan 2021-12-17 11:44:28 -06:00
parent 9cf06a535d
commit 7bba4718c0
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4

View file

@ -19,7 +19,7 @@ fn parse_target_rect(s: &str) -> Rect {
.nth(1).unwrap() .nth(1).unwrap()
.split("..") .split("..")
.map(|s2| { .map(|s2| {
println!("Parsing Int: {}", s2); // println!("Parsing Int: {}", s2);
s2.parse::<i64>().unwrap() s2.parse::<i64>().unwrap()
}) })
.take(2) .take(2)
@ -63,12 +63,12 @@ fn trick_shot(r: &Rect) -> (Option<i64>, i64) {
let mut valid_shots = 0; let mut valid_shots = 0;
for x in 1..=r.bottom_right.x { for x in 1..=r.bottom_right.x {
for y in r.bottom_right.y..=-r.bottom_right.y*2 { for y in r.bottom_right.y..=-r.bottom_right.y*2 {
println!("Simulating {}, {}", x, y); // println!("Simulating {}, {}", x, y);
if let Ok((v, hy)) = simulate_shot(Vec2 { x, y }, r) { if let Ok((v, hy)) = simulate_shot(Vec2 { x, y }, r) {
valid_shots += 1; valid_shots += 1;
if result.is_some() { if result.is_some() {
if hy > result.unwrap() { if hy > result.unwrap() {
println!("!! New Highest Y: {} via {}, {}", hy, x, y); // println!("!! New Highest Y: {} via {}, {}", hy, x, y);
result = Some(hy); result = Some(hy);
} }
} else { } else {