【发布时间】:2015-04-23 05:02:12
【问题描述】:
我正在尝试从世界中的随机位置开始围绕补丁 0 0 移动海龟。但圈子还在不断扩大。我在这里做错了什么?。
代码:
to setup
clear-all
create-turtles 5
ask turtles [
setxy random-xcor random-ycor
]
ask patch 0 0 [ set pcolor green ]
reset-ticks
end
to go
move-turtles
tick
end
to move-turtles
ask turtles
[
face patch 0 0
right 90
fd 0.01
set pen-size 3
pen-down
]
end
其次,当乌龟到达一定范围内时,我希望乌龟在我定义的任何补丁上移动
【问题讨论】:
标签: netlogo