to go
0 k; e) {1 m1 p$ [ prices( o8 V: |% |, h7 f* w- A
enlarge-market# `5 x) Q- A, _; T9 L
supervision
% N! A) M# c1 b- U* C6 Z move-turtles& X( g; F( s& w V
new-producer: ?9 {$ [: w' h& ~
check-death/ p# X% W3 J8 Y4 t/ Y9 {( E$ m
tick
2 T( N$ @' B7 H, j2 d, e3 O do-plots0 k' H3 D- A1 |% d7 ?- d+ _
end$ p& E: f4 y9 n) ^: _/ [: k. V
to move-turtles
* M9 f4 o( c' D pcs[
$ a) \4 D$ x/ A0 [& [8 o2 t ifelse counter > 0* ^. }- z0 p) T6 a1 a
[ set counter counter - 1) f( Q& w h* t" u+ f# W
set money money - cost1]
4 Y0 d& Y# [: S" J4 T [ right random 360! U' g: J3 e, Q' A& }) ]/ }0 F
repeat 1 [rt random 360; h& ?* R' L5 M/ ?' W6 |/ V) f
forward 1
. a1 i1 A/ K$ X. N" \ if pcolor = grey [
/ d( t2 Z# a( L% r& G8 e set pcolor yellow - 2
1 J( Z+ h- U+ J& |" I& u set quantity(quantity + 1)]]
2 t7 d8 I i) c set money(1 - exposure-rate / 100)*(money + jiage * quantity)* G; M7 q& `8 s0 z( |
set money money - cost1]9 v. m+ g3 k, I6 L0 Z& u4 C
]* K R) h0 ?- x6 ^$ ]
ask pes
" \- n8 a5 V; Q* \/ e [right random 360
( o+ `; y, P* X' M- J/ F0 X4 ] forward 1
* Z2 X3 K9 C o1 w$ K* B set money money + jiage * quantity% E6 L# [% O! r. u- l3 }+ p* q
set money money - cost2]4 ?2 Y. Z0 @* V
end |