diff --git a/src/problem5/lib.rs b/src/problem5/lib.rs index d018ef3..ac37312 100644 --- a/src/problem5/lib.rs +++ b/src/problem5/lib.rs @@ -18,42 +18,6 @@ enum Side { fn split(side: Side, lower: &mut i32, upper: &mut i32) -> Option { match side { -/* Side::Left => { - *upper = ((*upper - *lower + 1) / 2 + *lower); - //println!("{}, {}", *upper, *lower); - if (*upper - *lower).abs() == 1 { - Some(*lower) - } else { - None - } - } - Side::Right => { - *lower = ((*upper - *lower + 1) / 2 + *lower - 1); - //println!("{}, {}", *upper, *lower); - if (*upper - *lower).abs() == 1 { - Some(*upper - 1) - } else { - None - } - } - Side::Front => { - *upper = ((*upper - *lower + 1) / 2 + *lower); - // println!("{}, {}", *upper, *lower); - if (*upper - *lower).abs() == 1 { - Some(*lower) - } else { - None - } - } - Side::Back => { - *lower = ((*upper - *lower + 1) / 2 + *lower); - //println!("{}, {}", *upper, *lower); - if (*upper - *lower).abs() == 1 { - Some(*upper - 1) - } else { - None - } - }*/ Side::Left => { if (*upper - *lower).abs() == 1 { Some(*lower)