0
我开始与Netlogo一起开发,我面临的问题是我想让所有的海龟都以黑色移动。我怎样才能做到这一点 ?我尝试了补丁提前但我没有成功。 任何人都有解决方案?我会很感激。如何让海龟在Netlogo中以一种颜色移动
to setup
clear-all
import-drawing "patch.png"
create-turtles 10 [set xcor -10 set ycor -13]
ask turtles [set color white]
ask turtles [set shape "bug"]
reset-ticks
end
to bouge
ask turtles[
fd 1
]
end
to go
bouge
ask turtles [if [pcolor] of patch-ahead 6 != black [set heading heading - 100] ]
end
import-drawing“patch.png”不会更改pcolor值,请改为使用“import-pcolors”patch.png“'。 – Marzy
@Marzy对不起,迟到的答案!非常感谢,它真的工作:) – Anouar