fn are_within_distance(&self, a: &Coord, b: &Coord, distance: usize) -> bool {
        if a == b {
            return true;
        } else if distance == 0 || a.min_distance(&b) > distance {
            return false;
        }

        for coord in a.neighbors_by_direction(&b) {
            if ! self.is_water(&coord) {
                continue;
            } else if self.are_within_distance(&coord, b, distance - 1) {
                return true;
            }
        }
        false
    }
// invariant: a, b are coords to water cells
a, b are coords to water cells
a b are coords to water cells
fn are_within_distance(&self, a: &Coord, b: &Coord, distance: usize) -> bool {
        if a == b {
            return true;
        } else if distance == 0 || a.min_distance(&b) > distance {
            return false;
        }
        for coord in a.neighbors_by_direction(&b) {
            if ! self.is_water(&coord) {
                continue;
            } else if self.are_within_distance(&coord, b, distance - 1) {
                return true;
            }
        }
        false
    }
fn are_within_distance ( & self , a : & Coord , b : & Coord , distance : usize ) -> bool { if a == b { return true ; } else if distance == 0 || a . min_distance ( & b ) > distance { return false ; } for coord in a . neighbors_by_direction ( & b ) { if ! self . is_water ( & coord ) { continue ; } else if self . are_within_distance ( & coord , b , distance - 1 ) { return true ; } } false }
invariant: a, b are coords to water cells
invariant : a b are coords to water cells
&self
a
&Coord
b
&Coord
distance
usize
&self
a
&Coord
b
&Coord
distance
usize