title: NetLogo: select a patch with neighbors having certain qualities?
body: <p>I want to let my turtle move to certain patch and make a "splotch". The central patch = my turtle location, can be selected randomly, however satisfy two conditions: </p>
  
  <ul>
  <li>has to be in a certain distance from turtle's actual position</li>
  <li>has to surrounded (neighbors in certain radius) by patches with specific quality</li>
  </ul>
  
  <p>The reason is to create kind of "buffers" around my turtle's position, with aim to obstruct the close proximity of my clumps.</p>
  
  <p>Please, how can I satisfy these two conditions?</p>
  
  <p>As far, I have:</p>
  
  <pre><code>to go
   ask turtles [                 
     ; select one of patches in specific distance, and 
     ; surrounded by patches with no magenta color
     let aaa one-of patches with [distance myself &gt; 3 and   
         all? neighbors with [pcolor != magenta]] 
                        ; how to write this condition above ?? 
                        ; and how replace "neighbors" by "in-radius"??
     move-to aaa
     ask neighbors [           ; create clump of magenta patches
       set pcolor magenta ]
     ask patch-here [          ; set central patch to magenta
       set pcolor magenta ]
   ]
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/KTh7m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KTh7m.png" alt="enter image description here"></a></p>