pub fn ship_is_in_space(&self, pos: &[u8; 2]) -> bool {
        self.ships
            .iter()
            .any(|s| s.pos().contains(pos) && !s.is_placement())
    }
/// Returns whether a ship occupies the specified grid coordinates.
Returns whether a ship occupies the specified grid coordinates.
Returns whether a ship occupies the specified grid coordinates .
pub fn ship_is_in_space(&self, pos: &[u8; 2]) -> bool {
        self.ships
            .iter()
            .any(|s| s.pos().contains(pos) && !s.is_placement())
    }
pub fn ship_is_in_space ( & self , pos : & [ u8 ; 2 ] ) -> bool { self . ships . iter ( ) . any ( | s | s . pos ( ) . contains ( pos ) && ! s . is_placement ( ) ) }
Returns whether a ship occupies the specified grid coordinates.
Returns whether a ship occupies the specified grid coordinates .
&self
pos
&[u8; 2]
&self
pos
&[u8; 2]