我想使用下面的代码在Netlogo中创建一个按钮,但是计数问题在观察者0中显示为0,而在观察者中应该为10,为什么知道?
breed [ planets planet ]
planets-own [ distance-to-earth diameter heading ]
to create_planets
ca
ask n-of 10 patches [ sprout 1 ]
show count planets
end
[您告诉sprout
的补丁,但您不想让行星成为发芽的海龟品种。这将创建通用的乌龟。尝试使用sprout-planets
。