title: NetLogo : How to set condition if 3 of neighbors4
body: <p>I am trying to write an if statement that executes a command if three of neighbors4 are the same color - right now, I am using all? but I want to broaden to 3 instead of 4 neighbors.</p>
  
  <p>The code I tried does not give a boolean for the if statement</p>
  
  <pre><code>ask patches with [pcolor = black][
  if n-of 3 neighbors4 [pcolor != black]
  [set pcolor 55]
  ]
  </code></pre>
  
  <p>I also attempted to add in an = true? but that also resulted in an error</p>