网络徽标教程#3 - 看不到,只有补丁



我正在学习NetLogo用户手册上的教程#3,出于某种原因,当我将补丁分配为绿色并编写设置补丁和设置海龟功能时,我所能看到的只是绿色补丁,没有海龟。当我删除设置补丁功能时,我可以看到海龟,这样我就知道它们已经创建好了。我试着改变代码的顺序,但到目前为止没有任何效果。这是我的代码,如果有人有任何想法,我会洗耳恭听。

to setup
clear-all
setup-patches
setup-turtles
reset-ticks
end
to setup-patches
ask patches [ set pcolor green ]
end
to setup-turtles
create-turtles 100
ask turtles [ setxy random-xcor random-ycor ]
end
to go
move-turtles
tick
end
to move-turtles
ask turtles [
right random 360
forward 1
]
end

您是否有可能使用NetLogo 3D而不仅仅是NetLogo?这是我重现你问题的唯一方法。(这是初学者常见的错误。(

(如果您通过单击桌面图标打开NetLogo,请确保它指向NetLogo.exe,而不是NetLogo 3D.exe(

Steve R.

最新更新