netlogo在有限的坐标中询问路径颜色

时间:2012-02-01 14:59:47

标签: netlogo

我想知道在这个有限的坐标中是否有棕色斑块。但这不起作用。我怎么查询呢?

if not any? pcolor = brown with [ (pxcor >= max-pxcor - boundary-width) or (pxcor <= min-pxcor + boundary-width)][fd 2]

1 个答案:

答案 0 :(得分:0)

我想,你几乎就在那里。这样的事情应该有效:

  if not any? patches with 
    [ pcolor = brown and 
      ( pxcor >= max-pxcor - boundary-width) 
        or (pxcor <= min-pxcor + boundary-width) ]
    [ fd 2 ]