您好,我会尽量快点,我有一个房间,火势扩大了,我有两个出口,我想做的就是对特工说,如果一扇门被火堵住了,那就去另一个门。我想出了这样的东西,但没有结果。
to doorblock
show count neighbors with [pcolor = 77] ;; the patch color of the two doors
end
;;to go
ask smarts [ ;;smarts are the agents inside the room that need to get oout
if [ doorblock > 5 ]
[ set target one-of sexits]] ;;sexits is the other door
有人有更好的主意吗?谢谢