Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
简而言之,我正在努力做的是:
如果(任何补丁的颜色=红色)然后执行一些代码
if any? patches with [pcolor = red] [ print "yes, there is at least one red patch" ]
只有乌龟可以检查 pcolor。所以这有效:
ask turtles [show pcolor]
但这不起作用(在 Observer> 提示符下输入):
show pcolor