/// Creates a new `Ship` with the given position.
Creates a new `Ship` with the given position.
Creates a new ` Ship ` with the given position .
pub fn new(pos: Vec<[u8; 2]>) -> Result<Ship, &'static str> {
        let dir = Direction::from_positions(&pos[1], &pos[0])?;
        Ok(Ship {
            state: ShipState::Placement,
            position: pos,
            dir: dir,
        })
    }
pub fn new ( pos : Vec < [ u8 ; 2 ] > ) -> Result < Ship , & ' static str > { let dir = Direction :: from_positions ( & pos [ 1 ] , & pos [ 0 ] ) ? ; Ok ( Ship { state : ShipState :: Placement , position : pos , dir : dir , } ) }
Creates a new `Ship` with the given position.
Creates a new ` Ship ` with the given position .
pos
Vec<[u8; 2]>