【发布时间】:2014-10-26 09:08:17
【问题描述】:
所以我制作了品种玩家和僵尸:
breed [zombies zombie]
breed [players player]
如果僵尸走到黑斑(坑),我想杀死它。
to go
ask zombies
[
;set heading (heading + 45 - (random 90))
let closest-player min-one-of players[distance myself]
set heading towards closest-player
forward 1
;if xcor = pcolor black [Death] I have a lot to learn for netlogo syntax
;if ycor = pcolor black [Death] these lines are to give an Idea of what I'm trying to do.
]
end
to Death ;; turtle procedure
set shape "skull"
set color white
set heading 0
end
【问题讨论】:
-
您应该编辑您的问题并进行文本和代码格式设置。
标签: netlogo