-
Notifications
You must be signed in to change notification settings - Fork 0
/
lemonade.basic
647 lines (645 loc) · 16.6 KB
/
lemonade.basic
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
0 REM Run a lemonade stand.
5 GOSUB 10000
: GOSUB 11000
: GOTO 135
10 REM <<< LEMONADE STAND >>>
15 REM
20 REM FROM AN ORIGINAL PROGRAM
30 REM BY BOB JAMISON, OF THE
40 REM MINNESOTA EDUCATIONAL
50 REM COMPUTING CONSORTIUM
60 REM * * *
70 REM MODIFIED FOR THE APPLE
80 REM FEBRUARY, 1979
90 REM BY CHARLIE KELLNER
92 REM V.3 BY DREW LYNCH
94 REM V.4 BY BRUCE TOGNAZZINI
99 REM
135 DIM A(30),L(30),H(30),B(30),S(30),P(30),G(30)
150 P9 = 10
160 S3 = .15
170 S2 = 30
175 A2 = 2.00
194 C9 = .5
195 C2 = 1
300 REM START OF GAME
310 GOSUB 12000
: FOR I = 1 TO N
: B(I) = 0
: A(I) = A2
: NEXT
320 IF A$ = "Y" THEN GOSUB 13000
: GOTO 400
330 GOSUB 14000
400 REM WEATHER REPORT
410 SC = RND (1)
420 IF SC < .6 THEN SC = 2
: GOTO 460
430 IF SC < .8 THEN SC = 10
: GOTO 460
440 SC = 7
460 IF D < 3 THEN SC = 2
470 GOSUB 15000
490 TEXT
: HOME
500 REM START OF NEW DAY
510 D = D + 1
520 PRINT "ON DAY ";D;", THE COST OF LEMONADE IS ";
540 C = 2
: IF D > 2 THEN C = 4
550 IF D > 6 THEN C = 5
560 PRINT "$.0";C
: PRINT
570 C1 = C * .01
580 R1 = 1
600 REM CURRENT EVENTS
610 IF D < > 3 THEN 650
620 PRINT "(YOUR MOTHER QUIT GIVING YOU FREE SHUGAR)"
650 IF D < > 7 THEN 700
660 PRINT "(THE PRICE OF LEMONADE MIX JUST WENT UP)"
700 REM AFTER 2 DAYS THINGS CAN HAPPEN
710 IF D > 2 THEN 2000
800 REM INPUT VALUES
805 PRINT
: POKE 34, PEEK (37)
810 FOR I = 1 TO N
815 A(I) = A(I) + .000000001
820 G(I) = 1
: H(I) = 0
850 STI = A(I)
: GOSUB 4000
: PRINT "LEMONADE STAND ";I; TAB( 26);"ASSETS ";STI$
855 PRINT
860 IF B(I) = 0 THEN 890
870 PRINT "YOU ARE BANKRUPT, NO DECISIONS"
875 PRINT "FOR YOU TO MAKE."
: GOSUB 18000
: GOTO 1100
890 PRINT "HOW MANY GLASSES OF LEMONADE DO YOU"
895 PRINT "WISH TO MAKE ";
900 INPUT IN$
: L(I) = VAL (IN$)
901 IF L(I) < 0 OR L(I) > 1000 THEN 903
902 GOTO 906
903 PRINT "COME ON, LET'S BE REASONABLE NOW!!!"
904 PRINT "TRY AGAIN"
905 GOTO 890
906 IF L(I) < > INT (L(I)) THEN 903
910 IF L(I) * C1 < = A(I) THEN 950
920 PRINT "THINK AGAIN!!! YOU HAVE ONLY ";STI$
930 PRINT "IN CASH AND TO MAKE ";L(I);" GLASSES OF"
932 PRINT "LEMONADE YOU NEED $";L(I) * C1;" IN CASH."
940 GOTO 890
950 PRINT
951 PRINT "HOW MANY ADVERTISING SIGNS (";S3 * 100;" CENTS"
952 PRINT "EACH) DO YOU WANT TO MAKE ";
960 INPUT IN$
: S(I) = VAL (IN$)
961 IF S(I) < 0 OR S(I) > 50 THEN 963
962 GOTO 965
963 PRINT "COME ON, BE REASONABLE!!! TRY AGAIN."
964 GOTO 950
965 IF S(I) < > INT (S(I)) THEN 963
970 IF S(I) * S3 < = A(I) - L(I) * C1 THEN 1010
975 PRINT
980 STI = A(I) - L(I) * C1
: GOSUB 4000
985 PRINT "THINK AGAIN, YOU HAVE ONLY ";STI$
990 PRINT "IN CASH LEFT AFTER MAKING YOUR LEMONADE."
1000 GOTO 950
1010 PRINT
: PRINT "WHAT PRICE (IN CENTS) DO YOU WISH TO"
1012 PRINT "CHARGE FOR LEMONADE ";
1015 INPUT IN$
: P(I) = VAL (IN$)
1020 IF P(I) < 0 OR P(I) > 100 THEN 1022
1021 GOTO 1024
1022 PRINT "COME ON, BE REASONABLE!!! TRY AGAIN."
1023 GOTO 1010
1024 IF P(I) < > INT (P(I)) THEN 1022
1025 IF C5 = 1 THEN 1050
1050 VTAB 23
: INPUT "WOULD YOU LIKE TO CHANGE ANYTHING?";A$
1060 IF LEFT$ (A$,1) = "Y" THEN HOME
: C5 = 1
: GOTO 820
1100 HOME
1101 NEXT I
1110 C5 = 0
: TEXT
: HOME
1120 PRINT
: IF SC = 10 AND RND (1) < .25 THEN 2300
1130 PRINT "$$ LEMONSVILLE DAILY FINANCIAL REPORT $$"
1135 PRINT
1140 POKE 768,152
: POKE 769,80
: CALL 770
1142 POKE 768,128
: POKE 769,160
: CALL 770
1144 POKE 768,152
: POKE 769,40
: CALL 770
1146 POKE 768,144
: POKE 769,80
: CALL 770
1148 POKE 768,128
: POKE 769,200
: CALL 770
1180 REM CALCULATE PROFITS
1182 IF R2 = 2 THEN 2290
1183 IF R3 = 3 THEN 2350
1185 FOR I = 1 TO N
1186 IF A(I) < 0 THEN A(I) = 0
1187 IF R2 = 2 THEN 1260
1190 IF P(I) > = P9 THEN 1220
1200 N1 = (P9 - P(I)) / P9 * .8 * S2 + S2
1210 GOTO 1230
1220 N1 = ((P9 ^ 2) * S2 / P(I) ^ 2)
1230 W = - S(I) * C9
1232 V = 1 - ( EXP (W) * C2)
1234 N2 = R1 * (N1 + (N1 * V))
1240 N2 = INT (N2 * G(I))
1250 IF N2 < = L(I) THEN 1270
1260 N2 = L(I)
1270 M = N2 * P(I) * .01
1280 E = S(I) * S3 + L(I) * C1
1290 P1 = M - E
1300 A(I) = A(I) + P1
1310 IF H(I) = 1 THEN 2300
1320 PRINT
1321 IF B(I) < > 1 THEN 1330
1326 PRINT "STAND ";I;
: PRINT " BANKRUPT"
: GOSUB 18000
1327 VTAB 5
: CALL - 958
: GOTO 1390
1330 GOSUB 5000
1350 IF A(I) > C / 100 THEN 1390
1360 PRINT "STAND ";I
1365 HOME
: PRINT " ...YOU DON'T HAVE ENOUGH MONEY LEFT"
1370 PRINT " TO STAY IN BUSINESS YOU'RE BANKRUPT!"
1380 B(I) = 1
1382 GOSUB 18000
: HOME
1385 IF N = 1 AND B(1) = 1 THEN 31111
1390 NEXT I
1395 R1 = 1
1396 R2 = 0
1400 GOTO 400
2000 REM RANDOM EVENTS
2010 IF SC = 10 THEN 2110
2030 IF SC = 7 THEN 2410
2040 IF RND (1) < .25 THEN 2210
2050 GOTO 805
2100 IF X1 = 1 THEN 805
2110 J = 30 + INT ( RND (1) * 5) * 10
2112 PRINT "THERE IS A ";J;"% CHANCE OF LIGHT RAIN,"
2115 PRINT "AND THE WEATHER IS COOLER TODAY."
2120 R1 = 1 - J / 100
2130 X1 = 1
2140 GOTO 805
2200 IF X2 = 1 THEN 805
2210 PRINT "THE STREET DEPARTMENT IS WORKING TODAY."
2220 PRINT "THERE WILL BE NO TRAFFIC ON YOUR STREET."
2230 IF RND ( - 1) < .5 THEN 2233
2231 R2 = 2
2232 GOTO 2250
2233 R1 = .1
2250 X2 = 1
2260 GOTO 805
2290 PRINT "THE STREET CREWS BOUGHT ALL YOUR"
2295 PRINT "LEMONADE AT LUNCHTIME!!"
2296 FOR DE = 1 TO 1000
: NEXT DE
: VTAB 3
: CALL - 958
2297 GOTO 1185
2300 REM THUNDERSTORM!
2310 X3 = 1
: R3 = 0
2320 SC = 5
: GOSUB 15000
: TEXT
: HOME
2330 PRINT "WEATHER REPORT: A SEVERE THUNDERSTORM"
2340 PRINT "HIT LEMONSVILLE EARLIER TODAY, JUST AS"
2350 PRINT "THE LEMONADE STANDS WERE BEING SET UP."
2360 PRINT "UNFORTUNATELY, EVERYTHING WAS RUINED!!"
2370 FOR J = 1 TO N
: G(J) = 0
: NEXT
2380 GOTO 1185
2400 IF X4 = 1 THEN 805
2410 X4 = 1
2430 PRINT "A HEAT WAVE IS PREDICTED FOR TODAY!"
2440 R1 = 2
2450 GOTO 805
3000 END
4000 REM STI => DOLLARS.CENTS
4010 STI = INT (STI * 100 + .5) / 100
4020 STI$ = "$" + STR$ (STI)
4030 IF STI = INT (STI) THEN STI$ = STI$ + ".0"
4040 IF STI = INT (STI * 10 + .5) / 10 THEN STI$ = STI$ + "0"
4050 RETURN
5000 VTAB 6
: POKE 34,5
5002 PRINT " DAY ";D; TAB( 30);"STAND ";I
: PRINT
: PRINT
5010 PRINT " ";N2; TAB( 7);"GLASSES SOLD"
: PRINT
5012 STI = P(I) / 100
: GOSUB 4000
: PRINT STI$; TAB( 7);"PER GLASS";
5014 STI = M
: GOSUB 4000
: PRINT TAB( 27);"INCOME ";STI$
5016 PRINT
: PRINT
: PRINT " ";L(I); TAB( 7);"GLASSES MADE"
: PRINT
5020 STI = E
: GOSUB 4000
: PRINT " ";S(I); TAB( 7);"SIGNS MADE"; TAB( 25);"EXPENSES ";STI$
: PRINT
: PRINT
5030 STI = P1
: GOSUB 4000
: PRINT TAB( 16);"PROFIT ";STI$
: PRINT
5040 STI = A(I)
: GOSUB 4000
: PRINT TAB( 16);"ASSETS ";STI$
5060 GOSUB 18000
5070 REM
5090 HOME
: RETURN
7004 FOR J = 1 TO 6
: Y = I + K1
: I = I + K3 + RND (K1) * K5
: X = X + K1 - K2 * ( RND (K1) > KP)
: IF I > KTP AND X > KL THEN X = X - K2
10000 REM INITIALIZE
10100 POKE 770,173
: POKE 771,48
: POKE 772,192
: POKE 773,136
: POKE 774,208
: POKE 775,5
: POKE 776,206
: POKE 777,1
: POKE 778,3
: POKE 779,240
: POKE 780,9
: POKE 781,202
10110 POKE 782,208
: POKE 783,245
: POKE 784,174
: POKE 785,0
: POKE 786,3
: POKE 787,76
: POKE 788,2
: POKE 789,3
: POKE 790,96
: POKE 791,0
: POKE 792,0
10200 REM INIT VARIABLES
10210 I = K1 = X = Y
: K1 = 1
: KP = .5
: K5 = 5
: KB = 25
: K2 = 2
: K3 = 3
: K4 = 4
: K5 = 5
: K7 = 7
: KR = 27
: K8 = 8
: KT = 13
: KL = 14
: K6 = 6
: K9 = 9
10999 RETURN
11000 REM INTRODUCTION
11100 PRINT "LEMONADE STAND"
11105 GOTO 11280
11110 PRINT ";LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL;LLLLL";
11120 PRINT ";LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL;LLLLL";
11130 PRINT ";LLLL;;;;L;;;;;L;;;;L;;;;L;;;;L;;;;L;;;;";
11140 PRINT ";LLLL;LL;L;L;L;L;LL;L;LL;LLLL;L;LL;L;LL;";
11150 PRINT ";LLLL;;;;L;L;L;L;LL;L;LL;L;;;;L;LL;L;;;;";
11160 PRINT ";LLLL;LLLL;L;L;L;LL;L;LL;L;LL;L;LL;L;LLL";
11170 PRINT ";;;;L;;;;L;LLL;L;;;;L;LL;L;;;;L;;;;L;;;;";
11200 VTAB 11
11210 PRINT "LLLLLLLL;;;;;LL;LLLLLLLLLLLLLLL;LLLLLLLL";
11220 PRINT "LLLLLLLL;LLLLLL;LLLLLLLLLLLLLLL;LLLLLLLL";
11230 PRINT "LLLLLLLL;LLLLL;;;L;;;;L;;;;L;;;;LLLLLLLL";
11240 PRINT "LLLLLLLL;;;;;LL;LLLLL;L;LL;L;LL;LLLLLLLL";
11250 PRINT "LLLLLLLLLLLL;LL;LL;;;;L;LL;L;LL;LLLLLLLL";
11260 PRINT "LLLLLLLLLLLL;LL;LL;LL;L;LL;L;LL;LLLLLLLL";
11270 PRINT "LLLLLLLL;;;;;LL;LL;;;;L;LL;L;;;;LLLLLLLL";
11280 PRINT "COPYWRIGHT 1979: APPLE COMPUTER, INC."
11285 PRINT "USED BY PERMISSION OF APPLE COMPUTER, INC."
11290 PRINT "MODIFIED FOR USE BY THE BAUD LIBRARY BY:"
11292 PRINT "JOHN SHEETZ, K 2 A G I, AND"
11294 PRINT "JOE GIOVANELLI, W 2 P V Y."
11296 PRINT "OCCASIONAL, MISSPELLED WORDS USED IN ORDER TO"
11298 PRINT "ENHANCE SPEECH RECOGNITION."
11300 GOSUB 11700
: FOR I = 1 TO 2000
: NEXT
11305 PRINT "BOY!!! 23P IS 25P THIS 24P GONNA 25P TAIST 22P GOOD!!!24P"
11307 FOR I = 1 TO 2000
: NEXT
11310 GOTO 11360
11320 FOR I = 39 TO 7 STEP - 1
: COLOR= 15
: VLIN 18,37 AT I
: COLOR= 12
: IF I < 39 THEN VLIN 18,36 AT I + 1
11330 COLOR= 15
: IF I < 30 THEN VLIN 18,36 AT I + 10
11340 COLOR= 12
: IF I < 29 THEN VLIN 18,37 AT I + 11
: POKE 32,I + 11
: VTAB 11
: HTAB I + 12
: PRINT
: READ A$
: PRINT A$;
11350 FOR J = 14 TO I + I
: NEXT
: NEXT
: FOR I = 1 TO 1000
: NEXT
11360 FOR I = 36 TO 20 STEP - 1
11370 FOR J = 1 TO 50
: NEXT
: POKE 768,I * 3 - 12
: POKE 769,12
: CALL 770
: NEXT
11400 POKE 32,0
: POKE 33,40
: POKE 34,20
: POKE 35,23
: VTAB 22
11410 FOR I = 1 TO 4000
: NEXT
: I = FRE (0)
11490 RETURN
11500 REM DATA
11510 DATA 96,180,128,60,114,60,128,120,144,60,152,60,128,255,128,60,114,60,85,120,96,60,102,60,114,120,102,60,96,255,0,0
11520 DATA ,,,,,,L;LL;,L;LL;,;;LL;;,L;LL;,L;;;;,,,;L;;;;,;L;LL;,;L;LL;,;L;LL;,;;;LL;,,,,,*
11530 DATA 96,16,85,4,128,4,96,4,76,4,128,4,96,16,0,0
11540 DATA 114,120,144,60,114,255,1,120,128,120,144,60,128,120,114,60,144,120,171,255,228,255,0,0
11550 DATA 152,180,152,120,152,60,144,120,152,60,171,120,192,60,152,255,0,0
11560 DATA 0,160,128,255,152,40,171,80,192,40,228,255,1,40,0,160,192,255,192,40,171,80,152,40,128,255,0,0
11700 REM MUSIC
11710 READ I,J
: IF J = 0 THEN RETURN
11720 POKE 768,I
: POKE 769,J
: CALL 770
11730 GOTO 11710
12000 REM TITLE PAGE
12100 TEXT
: HOME
12110 PRINT "HI! WELCOME TO LEMONSVILLE, CALIFORNIA!"
: PRINT
12115 FOR I = 1 TO 10
: J = RND (1) * 25 + 50
: POKE 768,J
: POKE 769,10
: CALL 770
: NEXT
12120 PRINT "IN THIS SMALL TOUN, YOU ARE IN CHARGE OF"
12130 PRINT "RUNNING YOUR OWN LEMONADE STAND. YOU CAN"
12140 PRINT "COMPETE WITH AS MANY OTHER PEOPLE AS YOU"
12150 PRINT "WISH, BUT HOW MUCH PROFIT YOU MAKE IS UP"
12160 PRINT "TO YOU (THE OTHER STANDS' SALES WILL NOT"
12170 PRINT "AFFECT YOUR BUSINESS IN ANY WAY). IF YOU"
12180 PRINT "MAKE THE MOST MONEY, YOUR THE WINNER!!"
: PRINT
12190 PRINT "ARE YOU STARTING A NEW GAME? (YES OR NO)"
12200 VTAB 21
: CALL - 958
: INPUT "TYPE YOUR ANSWER AND HIT RETURN ==> ";A$
12210 A$ = LEFT$ (A$,1)
: IF A$ < > "Y" AND A$ < > "N" THEN PRINT CHR$ (7);
: GOTO 12200
12220 VTAB 23
: CALL - 958
: INPUT "HOW MANY PEOPLE WILL BE PLAYING ==> ";N$
12230 N = VAL (N$)
: IF N < 1 OR N > 30 THEN PRINT CHR$ (7);
: GOTO 12220
12240 RETURN
13000 REM NEW BUSINESS
13100 HOME
13110 PRINT "TO MANAGE YOUR LEMONADE STAND, YOU WILL "
13120 PRINT "NEED TO MAKE THESE DECISIONS EVERY DAY: "
: PRINT
13130 PRINT "1. HOW MANY GLASSES OF LEMONADE TO MAKE (ONLY ONE BATCH IS MADE EACH MORNING)"
13140 PRINT "2. HOW MANY ADVERTISING SIGNS TO MAKE (THE SIGNS COST FIFTEEN CENTS EACH) "
13150 PRINT "3. WHAT PRICE TO CHARGE FOR EACH GLASS "
: PRINT
13160 PRINT "YOU WILL BEGIN WITH $2.00 CASH (ASSETS)."
13170 PRINT "BECAUSE YOUR MOTHER GAVE YOU SOME SHUGAR,"
13180 PRINT "YOUR COST TO MAKE LEMONADE IS TWO CENTS "
13190 PRINT "A GLASS (THIS MAY CHANGE IN THE FUTURE)."
: PRINT
13200 GOSUB 18000
13202 HOME
13210 PRINT "YOUR EXPENSES ARE THE SUM OF THE COST OF"
13220 PRINT "THE LEMONADE AND THE COST OF THE SIGNS. "
: PRINT
13230 PRINT "YOUR PROFITS ARE THE DIFFERENCE BETWEEN "
13240 PRINT "THE INCOME FROM SALES AND YOUR EXPENSES."
: PRINT
13250 PRINT "THE NUMBER OF GLASSES YOU SELL EACH DAY "
13260 PRINT "DEPENDS ON THE PRICE YOU CHARGE, AND ON "
13270 PRINT "THE NUMBER OF ADVERTISING SIGNS YOU USE."
: PRINT
13280 PRINT "KEEP TRACK OF YOUR ASSETS, BECAUSE YOU "
13290 PRINT "CAN'T SPEND MORE MONEY THAN YOU HAVE! "
: PRINT
13300 GOSUB 18000
13302 HOME
: RETURN
14000 REM CONTINUE OLD GAME
14100 CALL - 936
: PRINT CHR$ (7);
: I = 0
14110 PRINT "HI AGAIN! WELCOME BACK TO LEMONSVILLE! "
: PRINT
14120 PRINT "LET'S CONTINUE YOUR LAST GAME FROM WHERE"
14130 PRINT "YOU LEFT IT LAST TIME. DO YOU REMEMBER "
14140 PRINT "WHAT DAY NUMBER IT WAS? ";
14150 INPUT "";A$
: A = VAL (A$)
: PRINT
: IF A < > 0 THEN 14200
14160 A$ = LEFT$ (A$,1)
: IF A$ = "Y" THEN PRINT "GOOD! WHAT DAY WAS IT? ";
: I = I + 1
: GOTO 14150
14170 IF A$ = "N" OR I > 0 THEN 14300
14180 PRINT CHR$ (7);"YES OR NO? ";
: I = I + 1
: GOTO 14150
14200 IF A < 1 OR A > 99 OR A < > INT (A) THEN 14300
14210 D = A
14300 PRINT "OKAY - WE'LL START WITH DAY NO. ";D + 1
: PRINT
14400 FOR I = 1 TO N
: PRINT
: PRINT
14410 PRINT "PLAYER NO. ";I;", HOW MUCH MONEY (ASSETS)"
: PRINT
14420 PRINT "DID YOU HAVE? ";
14430 INPUT "";A$
: A = VAL (A$)
: PRINT
14440 IF A < 2 THEN PRINT "O.K. - E'LL START YOU OUT WITH $2.00"
: A = 2
: GOTO 14490
14450 IF A > 40 THEN PRINT "JUST TO BE FAIR, LET'S MAKE THAT $10.00"
: A = 10
14490 A(I) = INT (A * 100 + .5) / 100
: NEXT
14500 PRINT
: PRINT CHR$ (7)
: INPUT "...READY TO BEGIN? ";A$
14510 IF LEFT$ (A$,1) = "N" THEN 13000
14520 RETURN
15000 REM WEATHER DISPLAY
15100 GOTO 15175
15110 COLOR= SC
: FOR I = 0 TO 25
: HLIN 0,39 AT I
: NEXT I
15120 COLOR= 12
: IF SC = 5 THEN COLOR= 4
15125 FOR I = 26 TO 39
: HLIN 0,39 AT I
: NEXT I
15130 COLOR= 8
: FOR I = 24 TO 32
: HLIN 15,25 AT I
: NEXT I
: HLIN 15,25 AT 14
: VLIN 14,23 AT 15
: VLIN 14,23 AT 25
15150 COLOR= 13
: FOR I = 17 TO 23 STEP 2
: VLIN 22,23 AT I
: NEXT I
15151 IF SC = 2 OR SC = 7 THEN 15160
15152 IF SC = 10 THEN COLOR= 15
15157 IF SC = 5 THEN COLOR= 0
15158 HLIN 6,10 AT 2
: HLIN 4,14 AT 3
: HLIN 7,12 AT 4
: HLIN 22,30 AT 4
: HLIN 20,36 AT 5
: HLIN 23,33 AT 6
: IF SC = 5 THEN GOSUB 17000
15159 GOTO 15170
15160 IF SC = 7 THEN COLOR= 9
15162 HLIN 3,5 AT 1
: HLIN 2,6 AT 2
: FOR I = 3 TO 6
: HLIN 1,7 AT I
: NEXT
: HLIN 2,6 AT 7
: HLIN 3,5 AT 8
15175 VTAB 22
: HTAB 8
: PRINT "LEMONSVILLE WETHER REPORT"
: PRINT
15180 IF SC = 2 THEN HTAB 18
: PRINT " SUNNY ";
15182 IF SC = 7 THEN HTAB 15
: PRINT " HOT AND DRY ";
15184 IF SC = 10 THEN HTAB 17
: PRINT " CLOUDY ";
15186 IF SC = 5 THEN HTAB 14
: PRINT " THUNDERSTORMS! ";
: GOSUB 17000
15200 RESTORE
15210 READ A$
: IF A$ < > "*" THEN 15210
15220 IF SC < > 2 THEN 15300
15230 READ I,J
: IF J = 0 THEN 15500
15240 FOR K = 1 TO J
: POKE 768,I
: POKE 769,10
: CALL 770
15250 FOR L = K TO J
: NEXT
: NEXT
: GOTO 15230
15300 READ I,J
: IF J < > 0 THEN 15300
15310 IF SC = 7 THEN 15400
15320 READ I,J
: IF J < > 0 THEN 15320
15330 IF SC = 10 THEN 15400
15340 READ I,J
: IF J < > 0 THEN 15340
15400 READ I,J
: IF J = 0 THEN 15500
15410 IF I = 1 THEN FOR I = 1 TO J
: NEXT
: GOTO 15400
15420 POKE 768,I
: POKE 769,J
: CALL 770
15430 GOTO 15400
15440 IF SC = 5 THEN GOSUB 17000
15500 IF SC = 5 THEN GOSUB 17000
15510 I = FRE (0)
: FOR I = 1 TO 200
: NEXT
: RETURN
17000 RETURN
17104 FOR J = 1 TO 6
: Y = I + K1
: I = I + K3 + RND (K1) * K5
: X = X + K1 - K2 * ( RND (K1) > KP)
: IF I > KTP AND X > KL THEN X = X - K2
18000 VTAB 24
: PRINT " PRESS SPACE TO CONTINUE, ESC TO END...";
18005 POKE - 16368,0
18010 GET IN$
: IF IN$ < > " " AND ASC (IN$) < > 27 THEN 18010
18020 IF ASC (IN$) < > 27 THEN RETURN
18021 HOME
: VTAB 8
: PRINT "ARE YOU SURE YOU WANT TO QUIT ?";
18022 GET IN$
18023 IF IN$ = "Y" THEN 31111
18024 RETURN
18030 RETURN
31111 HOME
31113 IF PEEK (994) + PEEK (1001) = 192 THEN CALL 1002
31116 SERIAL = 31416
31126 REM SERIAL NUMBER OF DISK
31136 POKE - 16368,0
: IF PEEK (1020) = INT (SERIAL / 256) AND PEEK (1021) = SERIAL - ( INT (SERIAL / 256) * 256) AND PEEK (1019) = 0 THEN 31156
31146 TEXT
: CALL - 936
: TEXT
: END
31156 POKE 1020,0
: POKE 1021,0
: PRINT
: PRINT "RUN INDEX"
: END