NetLogo, accessing color of a patch

こ雲淡風輕ζ 提交于 2019-12-13 01:39:51

问题


I am trying to apply the following condition:

if ( the color of patch -2 -1 is red )
[
   some commands
]

Could someone please tell me how to write this in NetLogo?


回答1:


if ([pcolor] of patch -2 -1 = red) 
[

]

Pretty much how you put it but in code, read the tutorials and what not and this should be simple. Note that you use pcolor for patches and color for turtles.

Good luck!



来源:https://stackoverflow.com/questions/3584034/netlogo-accessing-color-of-a-patch

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!