标签: netlogo
if(任何补丁的颜色=红色)然后执行一些代码
答案 0 :(得分:3)
if any? patches with [pcolor = red] [ print "yes, there is at least one red patch" ]
答案 1 :(得分:0)
只有一只乌龟可以检查pcolor。所以这有效:
ask turtles [show pcolor]
但这不起作用(输入Observer>提示符):
show pcolor