10 'V 15-01-83    **************************************************************
20 '1             *
30 '.             *         MONOPOLY
40 '0             *  FROM RCPM VOL 008
50 '1 23-01-83    *
60 '              **************************************************************
70 'ADAPTED BY BOB LIDDELOW TO MBASIC 5.21 & OC-1
80 '1.01 -ENGLISH PLACE NAMES SUBBED FOR AMERICAN
100 DIM P$(41),S(41),R(41),V(41),J(41),M(41),K(21),L(41),C(41),B(41),O(41)
110 CLS:PRINT "HOW MANY PLAYERS";
120 NNN=0:PRINT "(TYPE '0' FOR INSTRUCTIONS) ?";
130 NN$=INKEY$:IF NN$="" THEN NNN=NNN+1:GOTO 130 ELSE N=VAL(NN$):PRINT N
140 RANDOMIZE(NNN)
150 IF N>0 THEN 180
160 GOSUB 8690
170 GOTO 110
180 IF N<11 THEN 210
190 PRINT " NO MORE THAN 10 CAN PLAY"
200 GOTO 110
210 FOR Q5 = 1 TO N
220 PRINT CHR$(10) "NAME OF"Q5;
230 REM THIS PART STARTED FROM 151-2
240 REM A(B)=0 FOR HUMAN, 1 FOR COMPUTER
250 GOTO 310
260 N$(Q5)="COMPUTER"
270 A(Q5)=1
280 W7=W7+1
290 REM W7 IS # OF COMPUTER PLAYERS
300 GOTO 470
310 INPUT N$(Q5):IF N$(Q5)="" GOTO 310
320 IF N$(Q5)="COMPUTER" THEN 260
330 IF N$(Q5)="YOU" THEN 260
340 IF N$(Q5)<>"WHAT" THEN 360
350 GOTO 440
360 Z7=1
370 FOR O1=1 TO Q5-1
380 IF M$(O1)<>N$(Q5) THEN 410
390 PRINT "NAME IN USE, INPUT ANOTHER"
400 GOTO 220
410 NEXT O1
420 M$(Q5)=N$(Q5)
430 GOTO 470
440 PRINT "TYPE PLAYERS NAME (ONE ONLY AT A TIME)"
450 PRINT "'YOU' IF THE COMPUTER IS PLAYING."
460 GOTO 220
470 T(Q5)=1500
480 NEXT Q5
490 IF Z7=1 THEN 520
500 A7=1
510 A8=1
520 FOR B4= 1 TO 40
530 REM READS DATA, P$=NAME,S IS TYPE,R IS RENT, AND C IS COST
540 READ P$(B4),S(B4)
550 REM B3= B= PLAYER NUMBER
560 IF S(B4)>8 THEN 580
570 GOTO 600
580 READ L(B4),C(B4)
590 R(B4)=L(B4)
600 NEXT B4
610 I0=1
620 J0=200
630 I=I+1
640 PRINT
650 PRINT "TURN";I
660 PRINT
670 GOSUB 7020
680 IF I0=0 THEN 710
690 GOTO 2890
700 I0=0
710 FOR B3=1 TO N
720 B=B3
730 IF A(B)=1 THEN 770
740 O$="YOU"
750 I$="YOUR"
760 GOTO 800
770 O$="I"
780 I$="MY"
790 REM THIS SETS O AND I$ FOR COMPUTER OR HUMAN
800 R5=0
810 U=0
820 IF Q(B)=1 THEN 3830
830 IF A(B)=1 THEN 890
840 IF N$(B)<>"ME" THEN 870
850 PRINT "YOUR TURN"
860 GOTO 930
870 PRINT N$(B3);"'S TURN"
880 GOTO 930
890 PRINT "MY TURN";
900 IF W7=1 THEN 920
910 PRINT "(PLAYER";B;")";
920 PRINT
930 IF T(B)>0 THEN 950
940 GOSUB 9130
950 IF Q(B)=1 THEN    3830
960 IF E(B)=0 THEN 990
970 B9=B3
980 GOSUB 4880
990 IF T(B)> 100 THEN 1010
1000 GOSUB 5820
1010 IF N(B)>0 THEN 1030
1020 IF X(B)=0 THEN 1050
1030 GOSUB 6340
1040 GOTO 1050
1050 B2=INT(RND(1)*6)+1
1060 B1=INT(RND(1)*6)+1
1070 PRINT "THE DICE ARE ON";B1;" AND ";B2
1080 IF B1=B2 THEN 1120 ELSE G(B)=0
1090 IF J(B)=1 THEN 1260
1100 G(B)=0
1110 GOTO 1620
1120 G(B)= G(B)+1
1130 REM G(B) IS NUMBER OF DOUBLES
1140 IF G(B)>=3 THEN 1210
1150 IF J(B)=1 THEN 1180
1160 REM J(B)= 1IF IN JAIL, =0 IF OUT OF JAIL
1170 GOTO 1620
1180 J(B)=0
1190 PRINT "OUT OF JAIL "
1200 GOTO 2870
1210 J(B)=1
1220 PRINT "3 DOUBLES . IN JAIL"
1230 P(B)=10:G(B)=0
1240 GOTO 2880
1250 G(B)=0
1260 IF F(B)>0 THEN 1280
1270 GOTO 1400
1280 PRINT " IN JAIL WILL ";O$;" USE ";I$;" JAILCARD";
1290 IF A(B)=0 THEN 1320
1300 PRINT "?* YES *"
1310 GOTO 1370
1320 INPUT X$
1330 IF LEFT$(X$,1)="N" THEN  1400
1340 IF LEFT$(X$,1)="Y" THEN 1370
1350 PRINT "YES OR NO";
1360 GOTO 1320
1370 F(B)=F(B)-1
1380 D(B)=0
1390 GOTO 1600
1400 IF D(B)<3 THEN 1430
1410 PRINT "THIRD TIME IN JAIL.";O$;" MUST PAY $50."
1420 GOTO 1590
1430 PRINT "IN JAIL. WILL ";O$;" PAY $50";
1440 IF A(B)=0 THEN 1520
1450 D(B)=D(B)+1
1460 IF D(B)=3 THEN 1500
1470 IF T(B)>200 THEN 1500
1480 PRINT "?   *NO*"
1490 GOTO 2880
1500 PRINT "?  *YES*"
1510 GOTO 1590
1520 P(B)=P(B)+1
1530 INPUT A$
1540 P(B)=10
1550 IF LEFT$(A$,1)="Y" THEN 1590
1560 IF LEFT$(A$,1)="N" THEN 2880
1570 PRINT "TYPE 'YES' OR 'NO'";
1580 GOTO 1400
1590 T(B)= T(B)-50
1600 J(B)=0
1610 D(B)=0
1620 P(B)= P(B)+B1+B2
1630 R5=0
1640 U=0
1650 P=P(B)
1660 IF P(B)>40 THEN 1680
1670 GOTO 1720
1680 P(B)= P(B)- 40
1690 P=P(B)
1700 T(B)= T(B)+200
1710 PRINT "***** PASSED     GO!! COLLECTED $200 "
1720 IF S(P(B))>10 THEN 1750
1730 GOTO 2400
1740 P=P(B3)
1750 IF V(P(B))>B THEN 2150
1760 REM V(--) IS THE OWNER OF THE PROPERTY
1770 IF V(P(B))<B THEN 1790
1780 GOTO 1810
1790 IF V(P(B))>0 THEN 2150
1800 GOTO 1870
1810 Y9=P(B)
1820 IF A(B)=0 THEN 1850
1830 PRINT "I AM ON <";P$(P);"> WHICH I OWN."
1840 GOTO 2870
1850 PRINT "YOU ARE ON <";P$(Y9); "> WHICH YOU OWN "
1860 GOTO 2870
1870 P=P(B3)
1880 IF A(B)=0 THEN 1910
1890 PRINT"<" P$(P);"> IS AVAILABLE AT PRICE $";C(P);" WILL I BUY IT";
1900 GOTO 1930
1910 PRINT "WILL YOU BUY <";P$(P);"> FOR $";C(P);
1920 IF A(B)=0 THEN 1980
1930 IF T(B)<200 +C(P) THEN 1960
1940 PRINT "?  *YES*"
1950 GOTO 2030
1960 PRINT "?  *NO*"
1970 GOTO 2870
1980 INPUT A$
1990 IF LEFT$(A$,1)="Y" THEN 2030
2000 IF LEFT$(A$,1)="N" THEN 2870
2010 PRINT "YES OR NO";
2020 GOTO 1980
2030 T(B)= T(B)- C(P(B))
2040 IF R5=1 THEN 2060
2050 GOTO 2070
2060 W(B)=W(B)+1
2070 IF U=1 THEN 2090
2080 GOTO 2100
2090 U(B)= U(B)+1
2100 V(P(B))= B
2110 U8=0
2120 GOSUB 4370
2130 GOTO 2870
2140 REM THIS IS RENT ROUTINE
2150 IF R5=0 THEN 2180
2160 R(P(B))= 25* W(V(P(B)))
2170 GOTO 8430
2180 IF U=0 THEN 8430
2190 IF U(B)=2 THEN 2220
2200 U3=4
2210 GOTO 2230
2220 U3=10
2230 GOTO 8420
2240 IF A(W8)=0 THEN 2290
2250 PRINT "<"P$(W9); "> IS MINE";
2260 IF W7=1 THEN 2300
2270 PRINT "(PLAYER";W8;")";
2280 GOTO 2300
2290 PRINT "<"P$(W9);"> BELONGS TO "; N$(W8);
2300 IF M(P(B))=1 THEN 2350
2310 PRINT ", RENT IS $ "; R(P(B))
2320 T(B)=T(B)-R(P(B))
2330 T(V(P))= T(V(P))+ R(P(B))
2340 GOTO 2870
2350 PRINT " ,BUT IT IS MORTGAGED"
2360 GOTO 2870
2370 P=P(B3)
2380 T(V(P(B)))= T(V(P(B)))+ R(P(B))
2390 GOTO 2870
2400 ON S(P(B)) GOTO 2870,2480,2530,2600,2710,2740,2780,2420,2820,2850
2410 REM FOR UNIQUE SQUARES IT SENDS THE PROGRAM TO THE RIGHT DIRECTION
2420 Y9=P(B)
2430 IF A(B)=0 THEN 2460
2440 PRINT "I AM ON <";P$(Y9);">."
2450 GOTO 2870
2460 PRINT "YOU ARE ON <";P$(Y9)">"
2470 GOTO 2870
2480 PRINT "COMMUNITY CHEST ";
2490 PRINT "--";
2500 GOSUB 3860
2510 REM GOES TO CHANCE-COMMUNITY CHEST GOSUB
2520 GOTO 2550
2530 PRINT "CHANCE--";
2540 GOSUB 3860
2550 IF V0=1 THEN 2570
2560 GOTO 2870
2570 V0=0
2580 R5=1
2590 GOTO 1750
2600 Z2=.1*(T(B))
2610 IF Z2>0 THEN 2640
2620 PRINT  O$;" IS ON INCOME TAX, BUT HAS A NEGATIVE AMOUNT OF MONEY"
2630 GOTO 2870
2640 IF Z2>200 THEN 2680
2650 T(B)= T(B)-INT(Z2)
2660 PRINT "INCOME TAX--$";INT(Z2)
2670 GOTO 2870
2680 T(B)= T(B)- 200
2690 PRINT "INCOME TAX-$200"
2700 GOTO 2870
2710 T(B)= T(B)-75
2720 PRINT "SUPER TAX $75"
2730 GOTO 2870
2740 J(B)=1
2750 P(B)=10
2760 PRINT "GO TO JAIL"
2770 GOTO 2870
2780 PRINT "FREE PARKING-$";J0;"."
2790 T(B)=T(B)+J0
2800 J0=200
2810 GOTO 2870
2820 R5=1
2830 GOTO 1750
2840 GOTO 2870
2850 U=1
2860 GOTO 1740
2870 IF G(B)>0 THEN 1050
2880 PRINT
2890 IF A8=-1 THEN J8=B3:GOTO 3130
2900 IF A8=0 THEN 2960
2910 IF A8=5 THEN 2940
2920 A8=A8+1
2930 GOTO 3810
2940 A8=1
2950 GOTO 3110
2960 PRINT "SUMMARY";
2970 INPUT A$
2980 IF A$="AUTO" THEN 3000
2990 GOTO 3020
3000 PRINT:INPUT"   PRESS <RET> TO CONTINUE ",ANY$:A8=1
3010 GOTO 3810
3020 IF A$="ALWAYS" THEN 3040
3030 GOTO 3060
3040 A8=-1
3050 GOTO 3110
3060 IF LEFT$(A$,1)="N" THEN 3810
3070 IF LEFT$(A$,1)="Y" THEN 3110
3080 PRINT "<YES>, <NO>, <AUTO> OR <ALWAYS>. AUTO GIVES SUMMARY EVERY 5 TURNS.
3090 PRINT "ALWAYS GIVES FULL SUMMARY EVERY TURN"
3100 GOTO 2960
3110 GOTO 3120
3120 FOR J8=1 TO N
3130 PRINT :X=0
3140 T0=0
3150 IF Q(J8)=1 THEN 3760
3160 T$=" "
3170 IF A(J8)=1 THEN 3230
3180 IF N$(J8)<>"ME" THEN 3210
3190 PRINT "YOU HAVE $";T(J8);
3200 GOTO 3270
3210 PRINT N$(J8);" HAS $";T(J8);
3220 GOTO 3270
3230 PRINT "I";
3240 IF W7=1 THEN 3260
3250 PRINT "(PLAYER";J8;")";
3260 PRINT " HAVE $";T(J8);
3270 FOR J9=1 TO 40
3280 IF V(J9)=J8 THEN 3300
3290 GOTO 3460
3300 IF T$= " " THEN 3320
3310 PRINT ","; T$;
3320 T$= P$(J9)
3330 X=X+C(J9)+B(J9)*INT((S(J9)-10)/2+.5)*50 -M(J9)* .5*C(J9)
3340 IF B(T)=0 THEN 3420
3350 IF B(T)>1 THEN 3380
3360 PRINT "(WITH A HOUSE)";
3370 GOTO 3420
3380 IF B(T)<5 THEN 3410
3390 PRINT "(WITH A HOTEL)";
3400 GOTO 3420
3410 PRINT "(WITH";B(T);"HOUSES)";
3420 IF M(T)=0 THEN 3440
3430 PRINT "(MORTGAGED)";
3440 T=J9
3450 IF T0=1 THEN 3570
3460 NEXT J9
3470 IF F(J8)>0 THEN 3530
3480 IF T$<>" " THEN 3510
3490 PRINT "."
3500 GOTO 3720
3510 PRINT ", AND ";T$;
3520 GOTO 3550
3530 IF T$=" " THEN 3580
3540 PRINT ",";T$;
3550 T0=1
3560 GOTO 3340
3570 T0=0
3580 IF F(J8)=0 THEN 3660
3590 IF F(J8)=1 THEN 3630
3600 PRINT ",AND ";F(J8);"JAILCARDS.";
3610 X=X+F(J8)*50
3620 GOTO 3720
3630 PRINT ",AND A JAILCARD.";
3640 X=X+50
3650 GOTO 3720
3660 IF T$=" " THEN 3720
3670 K(0)=LEN(T$):FOR XE=1 TO K(0):K(XE)=ASC(MID$(T$,XE,1)):NEXT XE
3680 IF K(K(0))=46 THEN 3710
3690 PRINT ".";
3700 GOTO 3720
3710 GOTO 3720
3720 PRINT
3730 IF  X=0 THEN 3750
3740 PRINT "     TOTAL ASSETS:$";T(J8)+X;"."
3750 PRINT:IF J8=N OR A8=-1 THEN GOTO 3755 ELSE INPUT"     PRESS <RET> TO CONTINUE ",ANY$
3755 IF A8=-1 GOTO 3770
3760 NEXT J8
3770 PRINT "         ";
3780 PRINT "$";J0;" ON THE FREE PARKING JACKPOT."
3790 'PRINT
3800 PRINT:INPUT"     PRESS <RET> TO CONTINUE ",ANY$
3810 IF I0=0 THEN 3830
3820 GOTO 700
3830 PRINT
3840 NEXT B3
3850 GOTO 630
3860 J5=INT(RND(1)*7)+1
3870 ON J5 GOTO 3880,3920,3980,4040,4100,4150,4180
3880 PRINT "GOTO JAIL!!!"
3890 J(B)=1
3900 P(B)=10
3910 GOTO 4200
3920 PRINT "COLLECT $50 FROM EVERYONE"
3930 FOR Y3=1 TO N
3940 T(Y3)= T(Y3)-50
3950 NEXT Y3
3960 T(B)=T(B)+N*50
3970 GOTO 4200
3980 PRINT "GO TO  KING'S CROSS STATION"
3985 PRINT"    PASSED GO - COLLECT $200":T(B)=T(B)+200
3990 P(B)=5
4000 P=5
4010 V0=1
4020 REM V0 TELLS THE PROGRAM TO GO TO KING'S CROSS
4030 RETURN
4040 PRINT "PAY ALL $50"
4050 FOR Y4=1 TO N
4060 T(Y4)= T(Y4)+50
4070 NEXT Y4
4080 T(B)=T(B)-N*50
4090 GOTO 4200
4100 Y2=INT(RND(1)*4)+1
4110 PRINT "PAY  $";Y2*50
4120 T(B)=T(B)-Y2*50
4130 J0=J0+Y2*50
4140 GOTO 4200
4150 PRINT "GO DIRECTLY TO GO"
4160 P(B)=40
4170 GOTO 4200
4180 PRINT "TICKET OUT OF JAIL"
4190 F(B)=F(B)+1
4200 RETURN
4210 DATA OLD KENT ROAD,11,2,60,CC,2,WHITECHAPEL ROAD,11,4,60,IT,4
4220 DATA KING'S CROSS STATION,9,25,200,THE ANGEL ISLINGTON,12,6,100,CH,3
4230 DATA EUSTON ROAD,12,6,100,PENTONVILLE ROAD,12,8,120,JAIL,8
4240 DATA PALL MALL,13,10,140,ELECTRIC Co.,10,1,150,WHITEHALL
4250 DATA 13,10,140,NORTHUMBERLAND AVENUE,13,12,160,MARYLEBONE STATION,9,25,200
4260 DATA BOW STREET,14,14,180,CC,2,MARLBOROUGH STREET,14,14,180
4270 DATA VINE STREET,14,16,200,FP,7,STRAND,15,18,200
4280 DATA CH,3,FLEET STREET,15,18,220,TRAFALGAR SQUARE,15,20,240
4290 DATA FENCHURCH ST. STATION,9,25,200
4300 DATA LIECESTER SQUARE,16,22,260,COVENTRY STREET
4310 DATA  16,22,260,WATER WORKS,10,1,150,PICCADILLY
4320 DATA 16,24,280,GOJAIL,6,REGENT STREET,17,26,300,OXFORD STREET
4330 DATA 17,26,300,CC,2,BOND STREET,17,28,320
4340 DATA LIVERPOOL ST. STATION,9,25,200,CHANCE,3,PARK LANE,18
4350 DATA 35,350,LT,5,MAYFAIR,18,50,400,GO,8
4360 DATA GO,8
4370 Z=0
4380 Z(3)=0
4390 Z(2)=0
4400 Z(1)=0
4410 IF U8=0 THEN 4450
4420 B9=E9
4430 P=E8
4440 GOTO 4470
4450 B9=B3
4460 P=P(B9)
4470 IF S(P)<11 THEN 4600
4480 IF P>4 THEN 4510
4490 I7=0
4500 GOTO 4520
4510 I7= P-4
4520 IF P>35 THEN 4550
4530 Q1= P+4
4540 GOTO 4560
4550 Q1=40
4560 FOR W1= I7 TO Q1
4570 IF S(W1) = S(P) THEN 4590
4580 GOTO 4630
4590 IF V(W1)= B9 THEN 4610
4600 RETURN
4610 Z=Z+1
4620 Z(Z)=W1
4630 NEXT W1
4640 E(B9)= E(B9)+1
4650 IF A(B9)=0 THEN 4680
4660  PRINT "I HAVE A MONOPOLY AND THE RENTS ARE DOUBLED"
4670 GOTO 4690
4680 PRINT "YOU NOW HAVE MONOPOLY. THE RENTS ARE DOUBLED"
4690 FOR Z2=1 TO 3
4700 R(Z(Z2))= 2*R(Z(Z2))
4710 O(Z(Z2))=1
4720 NEXT Z2
4730 IF S(Z(1))<11 THEN 4750
4740 GOTO 4760
4750 RETURN
4760 GOSUB 4880
4770 U8=0
4780 RETURN
4790 FOR I1=1 TO 40
4800 IF S(I1)= S(B) THEN 4820
4810 GOTO  4860
4820 IF V(I1)= V9 THEN 4840
4830 RETURN
4840 Z=Z+1
4850 Z(Z)=I1
4860 NEXT I1
4870 GOTO 4680
4880 PRINT " DO ";O$;" WANT HOUSES NOW";
4890 IF A(B9)=0 THEN 4930
4900 IF T(B9)>500 THEN  4990
4910 PRINT "? *NO*"
4920 RETURN
4930 INPUT Z$
4940 IF LEFT$(Z$,1)="N" THEN 4980
4950 IF LEFT$(Z$,1)="Y" THEN 5010
4960 PRINT "YES OR NO";
4970 GOTO 4930
4980 RETURN
4990 I3=1
5000 GOTO 5030
5010 PRINT "LOT,  #OF HOUSES";
5020 IF A(B)=0  THEN 5230
5030 FOR I2= 1 TO 40
5040 IF V(I2)<>B9 THEN 5100
5050 IF O(I2)=0 THEN 5100
5060 IF B(I2)>4 THEN 5100
5070 GOTO 5160
5080 H=I2
5090 GOTO 5360
5100 NEXT I2
5110 GOTO 5140
5120 IF I3> 5 THEN 5140
5130 GOTO 5030
5140 PRINT "?*NO*"
5150 RETURN
5160 IF T(B)>1700 THEN 5200
5170 IF B(I2)>5-INT(T(B)/350) THEN 5200
5180 H4=INT (T(B)/350)
5190 GOTO 5210
5200 H4= 5-B(I2)
5210 PRINT "?* YES ";H4;" ON ";P$(I2);"*"
5220 GOTO 5370
5230 INPUT H$,H5
5240 IF H$="N"OR H$="NO" THEN 4980
5250 IF H$="WHAT" THEN 9490
5260 IF H5>0 THEN 5300
5270 PRINT "A POSITIVE NUMBER PLEASE!"
5280 INPUT H5
5290 GOTO 5260
5300 FOR H=1 TO 40
5310 IF P$(H)= H$   THEN 5360
5320 NEXT H
5330 PRINT "WHAT LOT";
5340 INPUT H$
5350 GOTO 5240
5360 IF A(B)=0 THEN 5420
5370 H5=H4
5380 H=I2
5390 GOTO 5420
5400 PRINT "YOU DON'T OWN THAT"
5410 GOTO 4880
5420 H7=H5+B(H)
5430 GOSUB 5450
5440 GOTO 5700
5450 R(H)=L(H)
5460 IF H7<6 THEN 5500
5470 PRINT " YOU WILL HAVE TO HAVE 5 HOUSES (ONE HOTEL)"
5480 H5=H7-B(H)
5490 H7=5
5500 IF H7>0 THEN 5530
5510 PRINT "YOU CAN'T HAVE LESS THAN 0 HOUSES."
5520 GOTO 5680
5530 B(H)=0
5540 FOR H6= 1 TO H7
5550 B(H)=H6
5560 J=H
5570 IF B(H)=0 THEN 4980
5580 ON B(H) GOTO 5590,5610,5630,5650,5650
5590 R(J)= R(J)*2.5
5600 GOTO 5660
5610 R(J)=R(J)*3
5620 GOTO 5660
5630 R(J)= R(J)*2.3
5640 GOTO 5660
5650 R(J)=R(J)+185
5660 R(J)= 10* INT(R(J)/10 +.5)
5670 NEXT H6
5680 PRINT "THE RENT IS NOW $";R(J);"."
5690 RETURN
5700 C=INT((S(J)-10)/2+.5)*50
5710 IF H5=1 THEN 5740
5720 PRINT "THOSE WERE $";C;"EACH, MAKING $";H5*C;"."
5730 GOTO 5750
5740 PRINT "THAT WAS $";C;"."
5750 T(B9)= T(B9)- H5*C
5760 'X(B9)=X(B9)+H5
5770 RETURN
5780 PRINT "ANOTHER";
5790 GOTO 4890
5800 RETURN
5810 GOTO 4550
5820 PRINT "WHAT DO ";O$;" WANT TO MORTGAGE";
5830 I3=1
5840 IF A(B)=0 THEN 6020
5850 IF T(B)>150 THEN 5970
5860 FOR I4= 1 TO 40
5870 IF V(I4)=B THEN 5890
5880 GOTO 5950
5890 IF O(I4)= I3 THEN 5950
5900 IF M(I4)=1 THEN 5950
5910 IF B(I4)<>0 THEN 5950
5920 PRINT "?  *";P$(I4);"*"
5930 Z5=I4
5940 GOTO 6110
5950 NEXT I4
5960 IF I3=1 THEN 6000
5970 PRINT "?  *NOTHING*"
5980 RETURN
5990 GOTO 6220
6000 I3=0
6010 GOTO 5860
6020 INPUT Z$
6030 IF Z$="WHAT" THEN 9520
6040 IF LEFT$(Z$,3)<>"NOT" THEN 6060
6050 RETURN
6060 FOR Z5=1 TO 40
6070 IF P$(Z5)=Z$ THEN 6110
6080 NEXT Z5
6090 PRINT "WHAT";
6100 GOTO 6020
6110 IF B(Z5)>0 THEN 6230
6120 FOR X=1 TO 40
6130 IF S(X)<>S(Z5) THEN 6170
6140 IF  B(X)=0 THEN 6170
6150 PRINT "THERE ARE HOUSES ON OTHER LOTS OF MONPOLY. YOU MUST SELL THEM."
6160 GOTO 5820
6170 NEXT X
6180 GOTO 6260
6190 M(Z5)=1
6200 N(B)= N(B)+1
6210 T(B)= T(B)+.5*C(Z5)
6220 GOTO 5820
6230 PRINT "THERE ARE HOUSES ON IT"
6240 GOTO 5820
6250 RETURN
6260 IF V(Z5)>B3 THEN  6310
6270 IF V(Z5)<B3 THEN 6310
6280 IF M(Z5)=0 THEN 6300
6290 PRINT "IT ALREADY IS"
6300 GOTO 6190
6310 PRINT " YOU DON'T OWN THAT"
6320 GOTO 5830
6330 RETURN
6340 PRINT "UNMORTGAGE WHAT";
6350 IF A(B)=0 THEN 6470
6360 IF T(B)<150 THEN 6450
6370 FOR E0= 1 TO 40
6380 IF V(E0)= B THEN 6400
6390 GOTO 6440
6400 IF M(E0)=0 THEN 6440
6410 PRINT "?*"; P$(E0);"*"
6420 E=E0
6430 GOTO 6590
6440 NEXT E0
6450 PRINT "? *NOTHING*"
6460 GOTO 6700
6470 INPUT Z$
6480 IF Z$<>"WHAT" THEN 6520
6490 PRINT "TYPE 'NOTHING', A PROPERTY NAME, OR 'HOUSES' IF"
6500 PRINT "YOU WANT TO SELL THEM."
6510 GOTO 6470
6520 IF LEFT$(Z$,3)="NOT" THEN 6700
6530 IF Z$="HOUSES" THEN 6710
6540 FOR E=1 TO 40
6550 IF P$(E)=Z$ THEN 6590
6560 NEXT E
6570 PRINT "WHAT";
6580 GOTO 6470
6590 IF M(E)=1 THEN 6620
6600 PRINT "IT ISN'T MORTGAGED"
6610 GOTO 6340
6620 IF V(E)=B THEN 6650
6630 PRINT "YOU DON'T OWN IT"
6640 GOTO 6340
6650 M(E)=0
6660 N(B)= N(B)-1
6670 T(B)=T(B)-INT(.6*C(E))
6680 PRINT "WITH INTEREST THAT WAS$";INT(.6*C(E))
6690 IF N(B)>0 THEN 6340
6700 RETURN
6710 PRINT "LOT,# OF HOUSES";
6720 INPUT Z$,E2
6730 IF E2>0 THEN 6760
6740 PRINT "INPUT A POSITIVE NUMBER"
6750 GOTO 6710
6760 IF Z$="NO"  THEN 6220
6770 GOTO 6810
6780 PRINT "TYPE IN THE NAME OF THE LOT THEN THE # OF HOUSES YOU ARE"
6790 PRINT "SELLING. TO SELL NONE TYPE 'NO'"
6800 GOTO 6710
6810 FOR E3=1 TO 40
6820 IF P$(E3)=Z$ THEN  6870
6830 NEXT E3
6840 PRINT "WHAT LOT";
6850 INPUT Z$
6860 GOTO 6760
6870 B(E3)= B(E3)-E2
6880 X(B)=X(B)-E2
6890 IF B(E3)<0 THEN 6980
6900 H=E3
6910 H7=B(H)
6920 GOSUB 5450
6930 E4=INT((S(E3)-10)/2+.5)*25
6940 E4=E4*E2
6950 PRINT " YOU GET$";E4
6960 T(B)=T(B)+E4
6970 GOTO 6340
6980 PRINT "YOU DON'T HAVE THAT MANY"
6990 B(E3)=B(E3)+E2
7000 GOTO 6710
7010 GOTO 6340
7020 IF A7=1 THEN 7160
7030 IF E6=0 THEN 7070
7040 E6=E6+1
7050 IF E6<5 THEN 7200
7060 E6=1
7070 PRINT "CHANGES";
7080 E6=0
7090 INPUT Z$
7100 IF Z$<>"WHAT" THEN 7130
7110 PRINT "'YES', 'NO','NEVER',OR 'DELAY'( WILL ASK AGAIN IN THREE TURNS";
7120 GOTO 7090
7130 IF Z$= "NEVER" THEN 7150
7140 GOTO 7170
7150 A7=1
7160 RETURN
7170 IF LEFT$(Z$,1)="Y" THEN 7280
7180 IF Z$<>"DELAY" THEN 7220
7190 E6=1
7200 PRINT
7210 RETURN
7220 IF LEFT$(Z$,1)="N" THEN 7200
7230 PRINT "TYPE 'YES', OR 'NO' IF YOU WANT TO MAKE CHANGES OR NOT"
7240 PRINT "OR 'DELAY' TO HAVE IT ASK YOU LATER"
7250 GOTO 7070
7260 RETURN
7270 IF T(B9)> 300 THEN 4990
7280 GOTO 7320
7290 REM THIS PART WILL TRANSFERR OWNERSHIP OF A PROPERTY
7300 REM TO SOMEONE ELSE AND TRANSFER SOME MONEY TO
7310 REM TO CORRRESPOND
7320 PRINT "('WHAT,A,0' FOR INST.)";
7330 INPUT Z$,A$,A
7340 IF Z$="NEW PLAYER" THEN 10240
7350 IF A$<>"YOU" THEN 7370
7360 A$="COMPUTER"
7370 IF Z$="NEW PLAYER" THEN 10240
7380 IF Z$="WHAT" THEN 9540
7390 IF Z$= "NO" THEN 8350
7400 IF Z$="QUIT" THEN 7700
7410 IF Z$="JAIL CARD" THEN 7700
7420 IF Z$="JAILCARD" THEN 7700
7430 IF A$<>"BANK" THEN 7470
7440 GOTO 7700
7450 PRINT " THAT'S ILLEGAL!"
7460 GOTO 7320
7470 FOR E8=1 TO 40
7480 IF P$(E8)= Z$ THEN 7570
7490 NEXT E8
7500 PRINT "WHAT LOT";
7510 INPUT Z$
7520 IF Z$<>"WHAT" THEN  7550
7530 PRINT "TYPE THE PROPERTY NAME OR 'NO'"
7540 GOTO 7510
7550 IF Z$="NO" THEN 7070
7560 GOTO 7470
7570 IF S(E8)<9 THEN 8360
7580 T8=0
7590 IF V(E8)=0 THEN 8380
7600 IF B(E8)>0 THEN 7680
7610 FOR I2= 1 TO 40
7620 IF S(I2)<>S(E8) THEN 7660
7630 IF B(I2)=0 THEN 7660
7640 PRINT "THERE ARE HOUSES ON OTHER LOTS OF  MONOPOLY.YOU MUST SELL THEM."
7650 GOTO 7070
7660 NEXT I2
7670 GOTO 7700
7680 PRINT "THERE ARE HOUSES ON IT"
7690 GOTO 7320
7700 T8=0
7710 FOR E9= 1 TO N
7720 IF N$(E9)=A$ THEN 7740
7730 GOTO 7750
7740 T8=T8+1
7750 NEXT E9
7760 ON T8+1 GOTO 7880,7970,7770,7770,7770,7770,7770,7770,7770,7770
7770 PRINT "WHICH PLAYER NO.('-1' FOR INSTRUCTIONS)";
7780 INPUT E9
7790 IF E9>0 THEN 7830
7800 PRINT "TYPE THE PLAYER NO. OF THE PIECE. BECAUSE I"
7810 PRINT "PLAY MORE THAN ONE PLAYER, I MUST KNOW WHICH";
7820 GOTO 7780
7830 IF E9>N THEN 7770
7840 IF A(E9)=1 THEN 7870
7850 PRINT "I AM NOT ";N$(E9)
7860 GOTO 7770
7870 GOTO 7970
7880 PRINT "WHO";
7890 INPUT A$
7900 IF A$="NO"  THEN 8400
7910 IF A$<>"WHAT" THEN 7930
7920 PRINT "TYPE NEW OWNER'S NAME OR 'NO'";
7930 GOTO 7700
7940 REM THIS IS FOR JAILCARDS
7950 GOSUB 9730
7960 GOTO 7070
7970 GOTO 7980
7980 FOR E9=1 TO N
7990 IF N$(E9)<>A$ THEN 8010
8000 GOTO 8020
8010 NEXT E9
8020 B=E9
8030 IF Z$="JAILCARD" THEN 7940
8040 IF Z$<>"QUIT" THEN 8080
8050 B=E9
8060 GOSUB 9360
8070 GOTO 7070
8080 U5=V(E8)
8090 IF A$="BANK" THEN 8200
8100 IF A(V(E8))=1 THEN 8530
8110 IF A(E9)=1 THEN 8470
8120 T(V(E8))= T(V(E8))+A
8130 IF S(E8)<>9 THEN 8160
8140 W(V(E8))=W(V(E8))-1
8150 W(E9)=W(E9)+1
8160 IF S(E8)<>10 THEN 8190
8170 U(V(E8))=U(V(E8))-1
8180 U(E9)=U(E9)+1
8190 V(E8)= E9
8200 T(E9)= T(E9)-A
8210 IF A$="BANK" THEN 7070
8220 IF O(E8)=1 THEN 8240
8230 GOTO 8320
8240 FOR O9= 1 TO 40
8250 IF S(O9)=S(E8) THEN 8270
8260 GOTO 8290
8270 R(O9)= R(O9)/2
8280 O(O9)=0
8290 NEXT O9
8300 PRINT "NO LONGER A MONOPOLY THERE"
8310 E(U5)= E(U5)-1
8320 U8=1
8330 P=E8
8340 GOSUB 4370
8350 GOTO 7070
8360 PRINT " YOU FOOL, YOU CANT OWN ";Z$;"!!!!"
8370 GOTO 7320
8380 PRINT "IT ISN'T OWNED"
8390 GOTO 7320
8400 GOTO 7070
8410 REM THIS BELONGS TO LINES 1049--
8420 R(P(B))=INT(RND(1)*6+1)*U3
8430 W9=P(B)
8440 W8=V(P(B))
8450 GOTO 2240
8460 W8=V(P(B))
8470 IF T(E9)> 200+ C(E8)  THEN 8500
8480 PRINT "I DONT ACCEPT"
8490 GOTO 7280
8500 IF  A> 150+C(E8) THEN 8480
8510 PRINT "I ACCEPT"
8520 GOTO 8120
8530 IF O(E8)=1 THEN 8630
8540 IF A>2*C(E8) THEN 700
8545 FOR O1=1 TO 41
8550 IF S(O1)<>S(E8) THEN 8570
8560 IF V(O1)<>E9 THEN 8610
8570 NEXT O1
8580 IF T(V(E8))>200 THEN 8630
8590 IF A<C(E8)+200 THEN 8630
8600 GOTO 8670
8610 IF T(V(E8))<200 THEN 8650
8620 GOTO 8630
8630 PRINT "I WON'T SELL"
8640 GOTO 7280
8650 IF A>1.5*C(E8) THEN 8670
8660 GOTO 8630
8670 PRINT "IT IS A DEAL"
8680 GOTO 8120
8690 CLS:PRINT "     THIS PROGRAM WILL HANDLE UP TO TEN PLAYERS"
8700 PRINT "OR PIECES. IT WILL DO ALL ROUTINE JOBS SUCH AS"
8710 PRINT "ROLLING THE DICE,MOVING PIECES, AND INFORMING THE"
8720 PRINT "PLAYERS OF ALL OPTIONS. IT WILL    ACTUALLY"
8730 PRINT "PLAY THE GAME MAKING THE DECISIONS OF ANY NUMBER OF PLAYERS."
8740 PRINT "WANT THE COMPUTER TO DO THIS TYPE 'YOU' WHEN IT ASKS"
8750 PRINT "FOR THE NAME."
8760 PRINT "OF PLAYERS. TO DO THIS TYPE 'YOU' AS THE"
8770 PRINT " NAME OF THAT PLAYER."
8780 PRINT
8790 PRINT "THIS PROGRAM IS FAIRLY SELF-EXPLANATORY, HOWEVER THE FOLLOWING"
8800 PRINT "THINGS MUST BE KEPT IN MIND:"
8810 PRINT
8820 PRINT " 1. IF A QUESTION IS NOT UNDERSTOOD,TYPING 'WHAT' WILL"
8830 PRINT "USUALLY GIVE INSTRUCTIONS. HOWEVER SOME QUESTIONS WILL"
8840 PRINT "ASK FOR MORE THAN ONE THING AND THIS NUMBER OF THINGS MUST"
8850 PRINT "BE TYPED SEPERATED BY COMMAS. ALSO CARE MUST BE "
8860 PRINT "TAKEN THAT ALL INPUTS ARE EITHER NUMERIC OR ALPHABETIC"
8870 PRINT "AS ASKED FOR.    EXAMPLE:"
8880 PRINT "          LOT, # OF HOUSES? WHAT,0"
8890 PRINT "WILL GIVE INSTRUCTIONS."
8900 PRINT:INPUT"     PRESS <RET> TO CONTINUE ",ANY$
8910 PRINT " 2. THE COMPUTER WILL OFTEN ASK IF YOU WANT CHANGES"
8920 PRINT "OR A SUMMARY. THE CHANGES ROUTINE WILL BE DESCRIBED"
8930 PRINT "BELOW, BUT IF YOU DON'T WANT TO BE BOTHERED WIL THE"
8940 PRINT "EVERYTIME, TYPE 'NEVER' TO HAVE IT STOP ASKING"
8950 PRINT "COMPLETELY, OR 'DELAY' TO HAVE IT ASK IN THREE"
8960 PRINT "TURNS. FOR SUMMARY TYPE 'AUTO' AND IT WILL "
8970 PRINT "GIVE A SUMMARY EVERY 5 TURNS, WITHOUT ASKING YOU AGAIN"
8980 PRINT " 3. TO SELL PROPERTIES OR ADD AND DROP PLAYERS USE THE "
8990 PRINT "CHANGES ROUTINE. TYPE 'YES' WHEN IT ASKS 'CHANGES?'"
9000 PRINT "TYPE 'YES' THEN TYPE 'WHAT,A,0' FOR COMPLETE INSTRUCTIONS"
9010 PRINT " 4. FIVE HOUSES ARE EQUIVALENT TO ONE HOTEL."
9020 PRINT " 5. IF YOU TYPE 'YOU' FOR ALL THE NAMES"
9030 PRINT "THE COMPUTER WILL PLAY ITSELF WITHOUT"
9040 PRINT "ASKING YOU FOR ANYTHING. TYPING CONTROL-O"
9050 PRINT "WILL MAKE THE GAME CONTINUE WITHOUT "
9060 PRINT "TYPE OUT, AND CONTROL-C THEN CONT   WILL START THE"
9070 PRINT " TYPE OUT AGAIN WITH THE GAME  VERY FAR ALONG."
9080 PRINT " 6. TO SELL HOUSES, WAIT UNTIL THE COMPUTER ASKS"
9090 PRINT "UNMORTGAGE WHAT? AND TYPE 'HOUSES' THEN    ANSWER"
9100 PRINT "ANSWER FURTHAR QUESTIONS."
9110 RETURN
9120 PRINT
9130 IF N7=1 THEN 9320
9140 IF A(B)=0 THEN 9220
9150 FOR I2= 1 TO N
9160 IF Q(I2)=1 THEN 9180
9170 IF A(I2)=0 THEN 9200
9180 NEXT I2
9190 GOTO 9320
9200 PRINT "I AM $";ABS(T(B));"IN THE RED. SHOULD I QUIT";
9210 GOTO 9230
9220 PRINT "YOU ARE $";ABS(T(B));"IN THE HOLE. WILL YOU QUIT";
9230 INPUT Z$
9240 IF LEFT$(Z$,1)="Y" THEN 9360
9250 IF LEFT$(Z$,1)="N" THEN 9310
9260 IF LEFT$(Z$,1)="L" THEN 9320
9270 PRINT "TYPE 'YES' TO QUIT OR 'NO' TO KEEP GOING"
9280 PRINT "AND PAYING 5% INTEREST ON THE NEGATIVE AMMOUNT"
9290 PRINT "OR 'LATER' TO NOT QUIT NOW BUT KEEP THE COMPUTER ASKING"
9300 GOTO 9230
9310 N7=1
9320 I1=INT(ABS(.05*T(B)+ .5))
9330 PRINT "5% INTEREST IS $";I1
9340 T(B)= T(B) - I1
9350 RETURN
9360 Q(B)=1
9370 T(B)=0
9380 FOR I2=1 TO 40
9390 IF V(I2)<>B THEN 9450
9400 V(I2)=0
9410 M(I2)=0
9420 B(I2)=0
9430 R(I2)=L(I2)
9440 O(I2)=0
9450 NEXT I2
9460 N$(B)=" "
9470 RETURN
9480 GOTO 6470
9490 PRINT "TYPE PROPERTY NAME THEN NUMBER OF HOUSES OR"
9500 PRINT "'NO,0' TO DO NOTHING"
9510 GOTO 5210
9520 PRINT "TYPE A PROPERTY NAME OR 'NOTHING' ";
9530 GOTO 6020
9540 PRINT " THIS ROUTINE CAN DO SEVERAL THINGS:"
9550 PRINT " 1. TO SELL PROPERTY FROM ONE PERSON TO ANOTHER"
9560 PRINT "TYPE THE PROPERTY NAME,THE NEW OWNER'S NAME, THEN"
9570 PRINT "THE AMOUNT IT IS BEING SOLD FOR."
9580 PRINT " 2. TO SELL A JAILCARD, TYPE 'JAILCARD',THE NEW OWNERS"
9590 PRINT "NAME, THEN THE AMOUNT IT IS BEING SOLD FOR."
9600 PRINT "IF NEEDED THE COMPUTER WILL ASK WHO IT CAME FROM."
9610 PRINT " 3. FOR EITHER OF THE ABOVE,'YOU' CAN BE USED AS THE"
9620 PRINT "NEW OWNER'S NAME,OR THE COMPUTERS PROPERTY CAN BE USES"
9630 PRINT "THE COMPUTER WILL THEN DECIDE IF IT WILL ACCEPT YOUR OFFER,"
9640 PRINT "AND TELL YOU IF IT WILL BUY OR SELL."
9650 PRINT " 4. TO ADD A NEW PLAYER TYPE:'NEW PLAYER',HIS NAME,'0'"
9660 PRINT " 5. TO DROP A PLAYER TYPE:'QUIT',HIS NAME,'0'"
9670 PRINT
9680 GOTO 7320
9690 B=E9
9700 REM THIS IS FOR QUITTING FROM CHANGE ROUTINE
9710 GOSUB 9360
9720 GOTO 7070
9730 REM THIS IS FOR CHANGING JAILCARDS
9740 IF N<>2 THEN 9770
9750 T0=3-E9
9760 GOTO 10000
9770 PRINT "WHO FROM";
9780 INPUT Z$
9790 IF Z$<>"WHAT" THEN 9830
9800 PRINT "TYPE THE PERSON'S NAME FROM WHOM THE CARD"
9810 PRINT " CAME.";N$(E9);" HAD IT. WHO HAS IT NOW";
9820 GOTO 9780
9830 IF Z$<>"YOU" THEN 9950
9840 IF W8=1 THEN 9940
9850 PRINT "WHICH #";
9860 PRINT "('0' FOR INST.)";
9870 INPUT O3
9880 IF O3>0 THEN 9910
9890 PRINT "I AM PLAYING SEVERAL PLAYERS. TYPE NO. OF ONE YOU WANT";
9900 GOTO 9870
9910 IF O3>N THEN 9890
9920 T0=O3
9930 GOTO 10000
9940 Z$="COMPUTER"
9950 FOR T0= 1 TO 40
9960 IF N$(T0)= Z$ THEN 10000
9970 NEXT T0
9980 PRINT "WHO ";
9990 GOTO 9780
10000 IF A(T0)=0 THEN 10080
10010 IF A>45 THEN 10040
10020 IF A<30 THEN 10060
10030 GOTO  10060
10040 PRINT " OK"
10050 GOTO 10190
10060 PRINT " NO"
10070 RETURN
10080 IF A(E9)=0 THEN 10130
10090 IF A>50 THEN 10060
10100 IF F(E9)=1 THEN 10060
10110 IF T(E9)<200 THEN 10060
10120 GOTO 10040
10130 IF F(T0)=1 THEN 10060
10140 IF A(T0)=0 THEN 10170
10150 IF A> 45 THEN 10060
10160 GOTO 10180
10170 PRINT "HE DOESN'T HAVE ONE"
10180 RETURN
10190 F(T0)= F(T0)-1
10200 F(E9)=F(E9)+1
10210 T(T0)=T(T0)+A
10220 T(E9)=T(E9)-A
10230 RETURN
10240 REM THIS ALLOWS A NEW PLAYER
10250 IF A$="YOU" THEN 10330
10260 FOR O9=1 TO N
10270 IF N$(O9)=A$ THEN 10300
10280 NEXT O9
10290 GOTO 10330
10300 PRINT "INPUT A NAME NOT ALREADY USED";
10310 INPUT A$
10320 GOTO 10260
10330 FOR O9=1 TO N
10340 IF Q(O9)=1 THEN 10490
10350 NEXT O9
10360 IF N<10 THEN 10390
10370 PRINT "TOO MANY PLAYERS.  SOMEONE WILL HAVE TO QUIT."
10380 GOTO 7070
10390 N=N+1
10400 Q(N)=0
10410 T(N)=1500
10420 IF A$<>"YOU" THEN  10470
10430 N$(N)="COMPUTER"
10440 W7=W7+1
10450 A(N)=1
10460 GOTO 7070
10470 N$(N)=A$
10480 GOTO 7070
10490 REM THIS IS FOR NEW PLAYER
10500 N$(O9)= A$
10510 Q(O9)=0
10520 P(O9)=0
10530 T(O9)=1500
10540 IF N$(9)<>"YOU" THEN 10580
10550 N$(O9)="COMPUTER"
10560 W7=W7+1
10570 A(O9)=1
10580 GOTO 7070
10590 END
