Added check for space around the ship.