fn collides_with(&self, that: &Room) -> bool {
        let (a_y1, a_x1) = self.top_left;
        let (a_y2, a_x2) = (self.down_right.0 - 1, self.down_right.1 - 1);
        let (b_y1, b_x1) = that.top_left;
        let (b_y2, b_x2) = (that.down_right.0 - 1, that.down_right.1 - 1);
        if a_y1 <= b_y1 && a_x1 <= b_x1 {
            b_y1 <= a_y2 && b_x1 <= a_x2
        } else {
            a_y1 <= b_y2 && a_x1 <= b_x2
        }
    }
/// Check whether or not 2 rooms collide
Check whether or not 2 rooms collide
Check whether or not 2 rooms collide
fn collides_with(&self, that: &Room) -> bool {
        let (a_y1, a_x1) = self.top_left;
        let (a_y2, a_x2) = (self.down_right.0 - 1, self.down_right.1 - 1);
        let (b_y1, b_x1) = that.top_left;
        let (b_y2, b_x2) = (that.down_right.0 - 1, that.down_right.1 - 1);
        if a_y1 <= b_y1 && a_x1 <= b_x1 {
            b_y1 <= a_y2 && b_x1 <= a_x2
        } else {
            a_y1 <= b_y2 && a_x1 <= b_x2
        }
    }
fn collides_with ( & self , that : & Room ) -> bool { let ( a_y1 , a_x1 ) = self . top_left ; let ( a_y2 , a_x2 ) = ( self . down_right . 0 - 1 , self . down_right . 1 - 1 ) ; let ( b_y1 , b_x1 ) = that . top_left ; let ( b_y2 , b_x2 ) = ( that . down_right . 0 - 1 , that . down_right . 1 - 1 ) ; if a_y1 <= b_y1 && a_x1 <= b_x1 { b_y1 <= a_y2 && b_x1 <= a_x2 } else { a_y1 <= b_y2 && a_x1 <= b_x2 } }
Check whether or not 2 rooms collide
Check whether or not 2 rooms collide
&self
that
&Room
&self
that
&Room