to go
. c! j6 R- F. l I4 s. ^ prices: H' c( a5 p+ u) M5 d
enlarge-market
( P# `. e/ P8 z6 [% | supervision8 P4 _) r5 V" D) M% Z
move-turtles
7 ~- [, h" K4 U* v5 _: v5 D2 \ new-producer; |0 K7 t) b' M! r* A* j
check-death
# w' {' x8 J& Q" ?8 | tick! q4 w/ A: S6 q g' I8 r5 T
do-plots
/ y4 h+ J. P$ S% q( Fend8 t6 _1 }/ t: ^
to move-turtles
% ?9 L; z% E+ \7 A9 q2 o pcs[
8 v: o, b2 L0 V% H6 d ifelse counter > 0
/ l' ?; L0 f" P1 g( n2 f2 c [ set counter counter - 1
8 _ I0 e) K2 v( \1 K. n/ G6 y set money money - cost1]
9 X" y$ Z0 G5 b, t$ c [ right random 360
; ~5 P4 P a: r' G repeat 1 [rt random 3608 y; R' J" N. j5 h
forward 1
. L# U8 [" i# ^+ O( w8 e if pcolor = grey [
6 U7 f( c/ g8 m& w; M set pcolor yellow - 2
6 z/ I: k7 J0 G' Q( N/ l set quantity(quantity + 1)]]1 h# b1 }7 B0 [( g; X C0 F, g
set money(1 - exposure-rate / 100)*(money + jiage * quantity)# f8 u$ }2 k5 P. ]# e* B
set money money - cost1]
5 Y F7 n/ l9 {8 I ]) F/ `% ]% V+ K- V) [4 D! O
ask pes1 G3 r! L2 D( m t
[right random 360$ y: B) {/ R% Z3 ]) R
forward 1
7 L& v' E Y0 |- b; z$ S# T set money money + jiage * quantity
( p3 i5 L6 Q# V1 M set money money - cost2]4 g# w, u/ K; F( q. u
end |