【发布时间】:2020-11-02 04:01:03
【问题描述】:
我有两只乌龟,颜色分别为“绿色”和“蓝色”。我想当绿海龟遇到蓝海龟时,蓝海龟变白停止移动,而绿海龟继续随机移动。这是我的代码,我这样做了,但它给出了 Expected a literal value 的错误,并且没有返回预期的结果。非常感谢任何帮助。
ask turtles with [color = green]
[if any? other turtles-here with [color = blue]
[set turtles with [color = blue] [color = white]
]
]
【问题讨论】:
标签: netlogo