NetLogo, accessing color of a patch

2019-08-01 19:54发布

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?

标签: patch netlogo
1条回答
叛逆
2楼-- · 2019-08-01 20:43
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!

查看更多
登录 后发表回答