-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
citybuilder.nlogo
1648 lines (1395 loc) · 38.5 KB
/
citybuilder.nlogo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
globals [
money
residential-cost
commercial-cost
industrial-cost
marina-cost
road-cost
demolish-cost
selection-cost
coal-power-plant-cost
coal-power-plant-radius
airport-cost
power-line-cost
population
road-capacity
current-month
traffic-density
]
turtles-own [
my-color
max-value
current-value
powered?
]
patches-own [
connected?
]
breed [houses house]
breed [stores store]
breed [factories factory]
breed [marinas marina]
breed [cars car]
breed [coal-power-plants coal-power-plant]
breed [power-lines power-line]
breed [boats boat]
breed [airports airport]
breed [jets jet]
to setup
clear-all
reset-ticks
set money 25000
set residential-cost 100
set commercial-cost 200
set industrial-cost 500
set marina-cost 1000
set road-cost 50
set demolish-cost 10
set coal-power-plant-cost 2500
set coal-power-plant-radius 35
set airport-cost 50000
set power-line-cost 10
set population 0
set road-capacity 0
set current-month "Spring"
set traffic-density 0
draw-river
end
to go
tick
if ticks mod 100 = 0 [update-buildings]
update-traffic
if ticks mod 500 = 0 [update-power]
update-population
if ticks mod 5000 = 0 [update-calendar]
if cars-moving = true [move-cars]
show-stuff
;set the "Cost" monitor showing the price of the current selection menu
if cursor-selection = "Residential" [set selection-cost residential-cost]
if cursor-selection = "Commercial" [set selection-cost commercial-cost]
if cursor-selection = "Industrial" [set selection-cost industrial-cost]
if cursor-selection = "Marina" [set selection-cost marina-cost]
if cursor-selection = "Roads" [set selection-cost road-cost]
if cursor-selection = "Demolish" [set selection-cost demolish-cost]
if cursor-selection = "Power Plant" [set selection-cost coal-power-plant-cost]
if cursor-selection = "Power Lines" [set selection-cost power-line-cost]
if cursor-selection = "Airport" [set selection-cost airport-cost]
if mouse-down? [
if money >= residential-cost and cursor-selection = "Residential" [place-residential]
if money >= commercial-cost and cursor-selection = "Commercial" [place-commercial]
if money >= industrial-cost and cursor-selection = "Industrial" [place-industrial]
if money >= marina-cost and cursor-selection = "Marina" [place-marina]
if money >= road-cost and cursor-selection = "Roads" [place-road]
if money >= demolish-cost and cursor-selection = "Demolish" [demolish-patch]
if money >= coal-power-plant-cost and cursor-selection = "Power Plant" [place-coal-power-plant]
if money >= power-line-cost and cursor-selection = "Power Lines" [place-power-line]
if money >= airport-cost and cursor-selection = "Airport" [place-airport]
]
end
to update-power
ask coal-power-plants [
set powered? true
]
;power the power lines and also normal size buildings
ask turtles with [breed != cars and breed != boats] [
if any? turtles in-radius 1 with [powered? = true and breed != cars and breed != boats] and any? coal-power-plants in-radius coal-power-plant-radius [set powered? true]
if any? turtles in-radius 3 with [powered? = true and size > 1 and breed != cars and breed != boats] and any? coal-power-plants in-radius coal-power-plant-radius [set powered? true]
]
;power the larger buildings
ask turtles with [size > 1 and breed != boats] [
if any? turtles in-radius 3 with [powered? = true] and any? coal-power-plants in-radius coal-power-plant-radius [set powered? true]
]
end
to draw-river
let cursor-x -20
let cursor-y 0
let river-direction 0
ifelse random 10 > 5 [set cursor-y random 20 + 1][set cursor-y random -20 + 1]
ask patch cursor-x cursor-y [set pcolor cyan]
while [cursor-x != 20] [
set river-direction random 5 + 1
print word "River Direction: " river-direction
;move left
if river-direction = 1 and cursor-x > -20 [set cursor-x cursor-x - 1]
;move right
if river-direction = 2 and cursor-x < 20 [set cursor-x cursor-x + 1]
if river-direction = 3 and cursor-x < 20 [set cursor-x cursor-x + 1]
;move up
if river-direction = 4 and cursor-y > -20 [set cursor-y cursor-y - 1]
;move down
if river-direction = 5 and cursor-y < 20 [set cursor-y cursor-y + 1]
ask patch cursor-x cursor-y [set pcolor cyan]
if cursor-x = 20 [stop]
]
end
to update-buildings
;check for new houses sprouting up
if road-capacity > 0 [
ask patches with [pcolor = green and not any? turtles-here with [breed != power-lines] and any? turtles with [powered? = true] in-radius 2] [
if random 500 = 1 [
if not any? houses in-radius 2 with [size > 1] and any? turtles in-radius 1 with [powered? = true] [
ask power-lines-here [die]
sprout-houses 1 [
set max-value 1
set current-value 1
set powered? false
set my-color color
]
]
]
]
]
;update max-values
if any? houses [
ifelse traffic-density < 100 [
ask houses with [powered? = true] [
set max-value 1
set max-value max-value + ((count stores in-radius 3) * 2) + ((count stores in-radius 4) * 1) - ((count factories in-radius 2) * 1)
set max-value max-value + ((count stores with [size > 1] in-radius 5) * 5)
set max-value max-value + (count patches with [pcolor = cyan] in-radius 3) * 5
set max-value max-value + ((count marinas in-radius 3) * 3)
if any? airports [set max-value max-value + 10]
if count stores = 0 [set max-value 0]
if count factories = 0 [set max-value 0]
if size = 1 and max-value > 5 [set max-value 5]
]
] [
if random 500 = 1 [
ask one-of houses [
set max-value max-value - 1
if max-value < 1 [set max-value 1]
]
]
]
;start loosing value if there's no power
ask houses with [powered? = false] [
if random 500 = 1 [set max-value max-value - 1]
]
]
;check each patch to see if it's value has grown
ask houses with [current-value < max-value] [
if random 50 = 1 and road-capacity > population [
set current-value current-value + 1
]
]
ask houses with [current-value > max-value] [set current-value max-value]
;check for new stores sprouting up
if road-capacity > 0 [
ask patches with [pcolor = blue and not any? turtles-here with [breed != power-lines] and any? turtles with [powered? = true] in-radius 1] [
if random 500 = 1 [
if not any? stores in-radius 2 with [size > 1] and any? turtles in-radius 1 with [powered? = true] [
ask power-lines-here [die]
sprout-stores 1 [
set max-value 1
set current-value 1
set powered? false
set my-color color
]
]
]
]
]
;update stores max values
if any? stores [
ifelse traffic-density < 100 [
ask stores with [powered? = true] [
set max-value 1
set max-value max-value + ((count houses in-radius 2) * 2) + ((count houses in-radius 3) * 1) + ((count factories in-radius 2) * 2)
set max-value max-value + ((count houses with [size > 1] in-radius 5) * 5)
set max-value max-value + (count patches with [pcolor = cyan] in-radius 3) * 5
if any? airports [set max-value max-value + 10]
if size = 1 and max-value > 5 [set max-value 5]
]
][
if random 500 = 1 [
ask one-of stores [
set max-value max-value - 1
if max-value < 1 [set max-value 1]
]
]
]
;start loosing value if there's no power
ask stores with [powered? = false] [
if random 500 = 1 [set max-value max-value - 1]
]
]
;check each patch to see if it's value has grown
ask stores with [current-value < max-value] [
if random 150 = 1 and road-capacity > population [
set current-value current-value + 1
]
]
ask stores with [current-value > max-value] [set current-value max-value]
;check for new factories sprouting up
if road-capacity > 0 [
ask patches with [pcolor = yellow and not any? turtles-here with [breed != power-lines] and any? turtles with [powered? = true] in-radius 1] [
if random 500 = 1 [
if not any? factories in-radius 2 with [size > 1] and any? turtles in-radius 1 with [powered? = true] [
ask power-lines-here [die]
sprout-factories 1 [
set max-value 1
set current-value 1
set powered? false
set my-color color
]
]
]
]
]
;update factories max values
if any? factories [
ifelse traffic-density < 100 [
ask factories with [powered? = true] [
set max-value 1
set max-value max-value + ((count houses in-radius 3) * 2) + ((count houses in-radius 4) * 1)
set max-value max-value + ((count houses with [size > 1] in-radius 5) * 5)
set max-value max-value + (count patches with [pcolor = cyan] in-radius 3) * 5
set max-value max-value + ((count marinas in-radius 3) * 3)
if any? airports [set max-value max-value + 10]
if size = 1 and max-value > 5 [set max-value 5]
]
][
if random 250 = 1 [
ask one-of factories [
set max-value max-value - 1
if max-value < 1 [set max-value 1]
]
]
]
;start loosing value if there's no power
ask factories with [powered? = false] [
if random 500 = 1 [set max-value max-value - 1]
]
]
;check each patch to see if it's value has grown
ask factories with [current-value < max-value] [
if random 250 = 1 and road-capacity > population [
set current-value current-value + 1
]
]
ask factories with [current-value > max-value] [set current-value max-value]
;check for new marina buildings sprouting up
if road-capacity > 0 [
ask patches with [pcolor = pink and not any? turtles-here with [breed != power-lines] and any? turtles with [powered? = true] in-radius 1] [
if random 500 = 1 [
if not any? marinas in-radius 2 with [size > 1] and any? turtles in-radius 1 with [powered? = true] [
ask power-lines-here [die]
sprout-marinas 1 [
set max-value 1
set current-value 1
set powered? false
set my-color color
]
]
]
]
]
;start loosing value if there's no power
ask marinas with [powered? = false] [
if random 500 = 1 [set current-value current-value - 1]
]
;check each patch to see if it's value has grown
if random 50 = 1 and road-capacity > population [
ask marinas with [powered? = true] [
set current-value current-value + 1
]
]
;update how houses, stores and factories look
ask houses [
if current-value <= 0 [die]
if current-value = 1 [
set shape "house"
set size 1
]
if current-value = 3 [
set shape "die 6"
set size 1
]
if random 50 = 1 [
if current-value >= 5 [
if (sum [count houses-here] of neighbors = 8) [
ask houses-on neighbors [
if size = 1 [die]
]
set size 3
set max-value 50
set current-value 50
]
]
]
]
ask stores [
if current-value <= 0 [die]
if current-value = 1 [
set shape "building store"
set size 1
]
if current-value = 3 [
set shape "i beam"
set size 1
]
;check for promotion
if random 50 = 1 [
if current-value >= 5 [
if (sum [count stores-here] of neighbors = 8) [
ask stores-on neighbors [
if size = 1 [die]
]
set size 3
set max-value 150
set current-value 100
]
]
]
]
ask factories [
if current-value <= 0 [die]
if current-value = 1 [
set shape "house colonial"
set size 1
]
if current-value = 3 [
set shape "factory"
set size 1
]
;check for promotion
if random 50 = 1 [
if current-value >= 5 [
if (sum [count factories-here] of neighbors = 8) [
ask factories-on neighbors [
if size = 1 [die]
]
set size 3
set max-value 250
set current-value 200
]
]
]
]
ask marinas [
if current-value <= 0 [die]
if current-value = 1 [
set shape "box"
set size 1
]
if current-value = 3 [
set shape "box"
set size 1
]
;check for promotion
if random 500 = 1 [
if current-value >= 5 [
if (sum [count marinas-here] of neighbors = 8) [
ask marinas-on neighbors [
if size = 1 [die]
]
set size 3
set current-value 1000
]
]
]
]
end
to move-cars
;move cars
if any? cars [
ask cars [
ifelse can-move? 1 [
ifelse ([pcolor = gray] of patch-ahead 1) [
if random 5 = 1 [fd 0.05]
][
ifelse random 10 <= 5 [left 90] [right 90]
]
][
left 180
]
if random 500 = 1 [left 90]
if random 500 = 1 [right 90]
]
]
;move boats
if any? boats [
ask boats [
ifelse can-move? 1 [
ifelse ([pcolor = cyan] of patch-ahead 1) [
if random 5 = 1 [fd 0.05]
][
ifelse random 10 <= 5 [left 90] [right 90]
]
][
left 180
]
if random 500 = 1 [set heading random 360]
]
]
;move jets
if any? jets [
ask jets [if random 5 = 1 [fd 0.05]]
ask jets [if [pcolor = sky] of patch-here [die]]
]
end
to update-traffic
;update traffic density
if road-capacity > 0 [
set traffic-density precision ((population / road-capacity) * 100) 0
;start adding cars if the car count when population is growing
if count patches with [pcolor = gray] > 0 [
if random 1000 = 1 [
if count cars / count patches with [pcolor = gray] < (traffic-density / 100) [
ask one-of patches with [pcolor = gray] [
sprout-cars 1 [
set shape "car"
set size 1
set my-color color
let car-heading random 3 + 1
if car-heading = 1 [set heading 0]
if car-heading = 2 [set heading 90]
if car-heading = 3 [set heading 180]
if car-heading = 4 [set heading 270]
move-to patch-here
]
]
]
]
;remove a car when traffic density is decreasing
if random 1000 = 1 [
if count cars / count patches with [pcolor = gray] > (traffic-density / 100) [
ask one-of cars [die]
]
]
]
]
;if the city has become weathly enough, sprout a boat and possibly remove a boat
if any? marinas [
if random 1500 = 1 [
ask one-of patches with [pcolor = cyan] [
sprout-boats 1 [
set shape "boat"
set my-color color
set size 1.5
]
]
]
if random 750 = 1 and any? boats [
ask one-of boats [die]
]
]
;if there's an airport, check for a new flight
if any? airports [
if random 1500 = 1 [
ask one-of patches [
sprout-jets 1 [
set shape "airplane"
set my-color color
set size 2
set heading towards one-of airports
]
]
]
]
;update road-capacity
set road-capacity count patches with [pcolor = gray] * 250
end
to show-stuff
;toggle buildings on/off
ifelse show-buildings = true [
ask houses [show-turtle]
ask stores [show-turtle]
ask factories [show-turtle]
ask marinas [show-turtle]
ask airports [show-turtle]
ask coal-power-plants [show-turtle]
][
ask houses [hide-turtle]
ask stores [hide-turtle]
ask factories [hide-turtle]
ask marinas [hide-turtle]
ask airports [hide-turtle]
ask coal-power-plants [hide-turtle]
]
;toggle cars on/off
ifelse show-cars = true [
ask cars [show-turtle]
ask boats [show-turtle]
ask jets [show-turtle]
][
ask cars [hide-turtle]
ask boats [hide-turtle]
ask jets [hide-turtle]
]
;toggle patch values on/off
ifelse show-values = true [
ask houses [set label current-value]
ask stores [set label current-value]
ask factories [set label current-value]
ask marinas [set label current-value]
][
ask turtles [set label ""]
]
ifelse show-power = true [
ask turtles with [powered? = true] [set color orange]
ask turtles with [powered? = false] [set color grey]
][
ask turtles [set color my-color]
]
end
to update-population
set population (sum [current-value] of houses * 100)
end
to update-calendar
if current-month = "Spring" [set current-month "Summer" stop]
if current-month = "Summer" [set current-month "Fall" stop]
if current-month = "Fall" [set current-month "Winter"]
if current-month = "Winter" [
set current-month "Spring"
set money money + sum [current-value] of turtles * 10
reset-ticks
stop
]
end
to place-marina
if mouse-down? [
ask patch mouse-xcor mouse-ycor [
if any? patches with [pcolor = cyan] in-radius 3 [
if pcolor = black and not any? coal-power-plants-here [
set pcolor pink
set money money - marina-cost
]
]
]
]
end
to place-residential
if mouse-down? [
ask patch mouse-xcor mouse-ycor [
if pcolor = black and not any? coal-power-plants-here [
set pcolor green
set money money - residential-cost
]
]
]
end
to place-commercial
if mouse-down? [
ask patch mouse-xcor mouse-ycor [
if pcolor = black and not any? coal-power-plants-here [
set pcolor blue
set money money - commercial-cost
]
]
]
end
to place-industrial
if mouse-down? [
ask patch mouse-xcor mouse-ycor [
if pcolor = black and not any? coal-power-plants-here [
set pcolor yellow
set money money - industrial-cost
]
]
]
end
to place-road
if mouse-down? [
ask patch mouse-xcor mouse-ycor [
if pcolor = black and not any? coal-power-plants-here [
set pcolor gray
set money money - road-cost
]
]
]
end
to place-coal-power-plant
if mouse-down? [
ask patch mouse-xcor mouse-ycor [
if pcolor = black and not any? houses-here and not any? stores-here and not any? factories-here and not any? coal-power-plants-here [
set money money - coal-power-plant-cost
ask power-lines-here [die]
sprout-coal-power-plants 1 [
set powered? true
set shape "factory"
set color yellow
set my-color color
set size 2
set max-value 100
set current-value 100
]
set pcolor orange
ask neighbors [set pcolor orange]
]
]
]
end
to place-airport
if mouse-down? [
ask patch mouse-xcor mouse-ycor [
if pcolor = black and not any? houses-here and not any? stores-here and not any? factories-here and not any? coal-power-plants-here [
set money money - airport-cost
ask power-lines-here [die]
sprout-airports 1 [
set powered? false
set shape "airport"
set color white
set my-color color
set size 10
set current-value 500
]
set pcolor sky
ask patches in-radius 5 [set pcolor sky]
]
]
]
end
to place-power-line
if mouse-down? [
ask patch mouse-xcor mouse-ycor [
if not any? houses-here and not any? stores-here and not any? factories-here and not any? power-lines-here and not any? coal-power-plants-here and pcolor != cyan [
set money money - power-line-cost
sprout-power-lines 1 [
set powered? false
set shape "line"
set color yellow
set my-color color
;orient power lines accordingly so they line up
carefully [
if any? power-lines-on patch-at-heading-and-distance 0 1 or any? power-lines-on patch-at-heading-and-distance 180 1 [set heading 0]
if any? power-lines-on patch-at-heading-and-distance 90 1 or any? power-lines-on patch-at-heading-and-distance 270 1 [set heading 90]
][]
]
]
]
]
end
to demolish-patch
let power-outage? false
print power-outage?
if mouse-down? [
ask patch mouse-xcor mouse-ycor [
;zoned areas
if pcolor = green or pcolor = yellow or pcolor = blue or pcolor = pink [
ask turtles-here [die]
set pcolor black
set plabel ""
set money money - demolish-cost
]
;power plants
if pcolor = orange [
if any? coal-power-plants-here [
ask neighbors [set pcolor black]
ask turtles-here [die]
set pcolor black
ask neighbors [set pcolor black]
set plabel ""
set money money - demolish-cost
]
]
;airports
if pcolor = sky [
if any? airports-here [
ask neighbors [set pcolor black]
ask turtles-here [die]
set pcolor black
ask neighbors [set pcolor black]
set plabel ""
set money money - demolish-cost
]
if not any? airports [
ask jets [die]
]
]
;power lines that aren't in a zoned area
if pcolor = black [
ask power-lines-here [
set power-outage? true
set money money - demolish-cost
die
]
]
;roads
if pcolor = gray [
set pcolor black
ask cars-here [die]
set plabel ""
set money money - demolish-cost
]
]
print power-outage?
if power-outage? = true [
ask turtles [set powered? false]
]
]
end
to save-game
let filepath "../cbuilder.csv"
ifelse user-yes-or-no? (word "File will be saved at: " filepath "\nIf this file already exists, it will be overwritten.\nAre you sure you want to save?") [
export-world filepath
user-message "File Saved."
][
user-message "Save Canceled. File not saved."
]
end
to load-game
let filepath (word "../cbuilder.csv")
ifelse user-yes-or-no? (word "Load File: " filepath "\nThis will clear your current level and replace it with the level loaded." "\nAre you sure you want to Load?") [
import-world filepath
user-message "Successfully loaded!"
][
user-message "Load Canceled. File not loaded."
]
end
@#$#@#$#@
GRAPHICS-WINDOW
9
10
755
757
-1
-1
18.0
1
14
1
1
1
0
0
0
1
-20
20
-20
20
0
0
1
ticks
30.0
CHOOSER
803
172
941
217
cursor-selection
cursor-selection
"Residential" "Commercial" "Industrial" "Marina" "Roads" "Power Lines" "Power Plant" "Airport" "Demolish"
5
BUTTON
800
11
863
44
Start
go
T
1
T
OBSERVER
NIL
NIL
NIL
NIL
1
BUTTON
883
13
973
46
Setup
setup
NIL
1
T
OBSERVER
NIL
NIL
NIL
NIL
1
MONITOR
1209
15
1301
76
City Funds
money
0
1
15
MONITOR
1309
15
1456
76
NIL
population