标签: netlogo
我想知道如何编写一段代码,使得“激励”在Netlogo中每次滴答减少1而不会降到零以下。
到目前为止,我已经想出了这个:
set excitation - 1
答案 0 :(得分:2)
你的意思是这个减量计数器与条件,“如果激励> 0”?
globals [ excitation ] if excitation > 0 [ set excitation excitation - 1 ]