fn covers_point(&self, point: &Point) -> bool {
        match self.alignment {
            Alignment::Horizontal => {
                self.position.y == point.y
                && (self.position.x <= point.x && point.x < self.position.x + self.size as u32)
            }
            Alignment::Vertical => {
                self.position.x == point.x
                && (self.position.y <= point.y && point.y < self.position.y + self.size as u32)
            }
        }
    }
/// Return true if the vehicle covers the given point
Return true if the vehicle covers the given point
Return true if the vehicle covers the given point
fn covers_point(&self, point: &Point) -> bool {
        match self.alignment {
            Alignment::Horizontal => {
                self.position.y == point.y
                && (self.position.x <= point.x && point.x < self.position.x + self.size as u32)
            }
            Alignment::Vertical => {
                self.position.x == point.x
                && (self.position.y <= point.y && point.y < self.position.y + self.size as u32)
            }
        }
    }
fn covers_point ( & self , point : & Point ) -> bool { match self . alignment { Alignment :: Horizontal => { self . position . y == point . y && ( self . position . x <= point . x && point . x < self . position . x + self . size as u32 ) } Alignment :: Vertical => { self . position . x == point . x && ( self . position . y <= point . y && point . y < self . position . y + self . size as u32 ) } } }
Return true if the vehicle covers the given point
Return true if the vehicle covers the given point
&self
point
&Point
&self
point
&Point