to go5 U' F5 W% V- f. g
prices t; X8 C% y5 s4 A9 W
enlarge-market3 x7 u6 K3 [$ K5 B7 O% e/ B; b
supervision. Z: M9 y0 q8 |9 ]2 Y j( S
move-turtles- u G9 Y, U: Z3 x5 W) v4 q* S; _
new-producer
! M+ C$ e6 p% `; O* c8 D4 k2 G check-death
) F& k" \) X1 x0 Z5 E7 h tick" h* j/ a+ g% C& n5 A
do-plots
6 s5 h0 F, A: @$ y5 J1 u) }6 vend7 J) e; J4 N6 e+ Q5 |1 N
to move-turtles( }. a8 J L: @+ S
pcs[& \3 v! R. }: j' N7 l* i
ifelse counter > 0# O3 P% S4 W0 G8 r8 I" O% I
[ set counter counter - 17 f- }$ ~7 n% }# v. p4 p) ]
set money money - cost1]5 a7 t. q4 `, l1 k
[ right random 360! o+ E0 g1 M# X9 Z
repeat 1 [rt random 360
* L9 a G& z* J1 U; {0 D forward 1" q9 F# r3 o3 [
if pcolor = grey [5 h7 C3 ^& i7 c
set pcolor yellow - 2* I& y/ m Z% A+ j/ o; I/ s) b+ }8 v
set quantity(quantity + 1)]]
+ E, \3 V+ N" O) \: c( {$ M set money(1 - exposure-rate / 100)*(money + jiage * quantity)$ u4 b6 U% f3 o: M/ [/ T2 b3 W9 C
set money money - cost1]0 G1 Y: C4 Y- I$ G; k0 e4 |
]
. h6 V! f0 E$ e/ d" T ask pes9 t7 p( d3 s6 P% I8 z
[right random 360
8 B: u6 q) U4 n3 h0 ? forward 1
# V8 B$ `; L% X set money money + jiage * quantity
( v1 u$ }2 Z( C6 @% _. t set money money - cost2]% \) ^! @, k4 F$ I6 Q2 J: G
end |