patch-ahead distance
在前面报告单个补丁。
如何在该领先点的半径范围内获得一组补丁?
答案 0 :(得分:2)
您可以让记者为您执行此操作,例如:
to-report patches-ahead [ rad dis ] ; turtle reporter
report [patches in-radius rad] of patch-ahead dis
end
请注意,它必须由乌龟调用-例如:
to setup
ca
crt 1
reset-ticks
end
to go
ask patches [
set pcolor black
]
ask turtles [
rt random 61 - 30
fd 1
ask patches-ahead 3 7 [
set pcolor white
]
]
tick
end