100 REM PROGRAM BY JIM BUTTERFIELD 110 REM TOWERS ARCHITECTURE BY JOHN STOUT 120 I=RND(-TI) 130 DN$="" 140 POKE59468,12:DEFFNR(X)=INT(RND(1)*X)+1 150 PRINT"[147][142] GRUNGY TOWERS" 160 PRINT"A MURDER HAS BEEN COMMITTED AT THE" 170 PRINT"TOWERS. YOUR JOB, SUPERINTENDENT, IS" 180 PRINT"TO FIND THE MURDERER. CHECK THE ALIBIS" 190 PRINT"CLOSELY: THE KILLER IS SURE TO GIVE" 200 PRINT"HIMSELF AWAY." 210 PRINT"HINT: NOBODY EVER SUSPECTS THE REAL" 220 PRINT"MURDERER." 230 PRINT"PLAYING HINT: YOU MAY NAME ANY ROOM" 240 PRINT"OR PERSON WITH THREE OR MORE LETTERS," 250 PRINT"E.G., 'LIV' FOR LIVING ROOM." 260 PRINT"PRESS ANY KEY TO START." 270 DIMM$(25),R$(25),K$(4),Y$(6) 280 DATA SHOT WITH A ANTIQUE PISTOL,STABBED WITH AN ORIENTAL DAGGER 290 DATA STRANGLED BY A SILKEN SASH,CLUBBED WITH A BRASS CANDLESTICK 300 DATA MANGLED BY A FALLEN CHANDELIER,SMOTHERED WITH AN ERMINE PILLOW 310 FORI=1TO6:READY$(I):NEXTI:Y%=FNR(6) 320 DATA SUPERINTENDENT,INSPECTOR,SERGEANT,CONSTABLE 330 FORI=1TO4:READK$(I):NEXTI:K%=1 340 FORI=1TO25:READR$(I):NEXT 350 DATAHALL,LIVING ROOM,KITCHEN,DINING ROOM,BILLIARD ROOM,DOWNSTAIRS LAV 360 DATABATHROOM,MASTER BEDROOM,NURSERY 370 DATASERVANT'S QUARTERS 380 DATACONSERVATORY,TERRACE,STABLES,ATTICS,LAUNDRY,LIBRARY,MUSIC ROOM,STUDY 390 DATABOILER ROOM,PANTRY,SCULLERY 400 DATAFIRST BEDROOM,SECOND BEDROOM,THIRD BEDROOM,FOURTH BEDROOM 410 FORI=1TO25:M$(I)="":NEXT 420 I=1 430 J=FNR(24)+1:IFM$(J)=""THENGOSUB3000:I=J:GOTO430 440 GETZ$:IFZ$=""GOTO440 450 PRINT"[147]":GOSUB2000 460 FORI=1TO25:IFM$(I)<>""THENNEXTI:GOTO490 470 J=FNR(25):IFM$(J)=""GOTO470 480 GOSUB3000:GOTO460 490 DIMS(12),N$(12),C$(12),A$(12),B$(12),R%(12) 500 GOSUB2000:FORI=1TO12:READN$(I),C$(I),A$(I),B$(I) 510 NEXTI 520 FORI=1TO25:IFLEN(M$(I))>1GOTO560 530 FORJ=I+1TO25:IFLEN(M$(J))>1GOTO550 540 GOSUB3000 550 NEXTJ 560 NEXTI 570 DATA FUNGUS,BUTLER,"SIR, I'M AFRAID I KNOW NOTHING.",MOST REGRETTABLE. 580 DATA MRS RAMSBOTTOM,COOK,"DON'T KNOW A THING, DEARIE.","ISN'T IT AWFUL?" 590 DATA BLOGGS,GARDENER,"WELL,GUV,IT BEATS ME.","IT'S A RUM GO" 600 DATA FIFI,MAID,"EET EES SO SURPRISEENG!","HOW YOU SAY, SCARY.." 610 DATA CHOLMONDELY,COLONEL,"BY JOVE! AWKWARD BUSINESS, THIS.","BOTHER!" 620 DATA LADY THROCKMORTON,DOWAGER,"DEAR ME..","IT'S VERY BAD MANNERED" 630 DATARAGS,CHAUFFEUR,"DON'T KNOW NOTHING, SIR:","MAKES YOU THINK, DON'T IT?" 640 DATA AGATHA FFORBES-SMYTHE,DEBUTANTE,GOODNESS!,"ISN'T IT JUST AWFUL?" 650 DATA TINSEL,ACTRESS,"DON'T KNOW A THING, DARLING.","HOW DRAMATIC, THOUGH!" 660 DATA MADAME BLINSKY,COUNTESS,"I SEE NODINK, MY DEAR.",IS VERY SINISTER 670 DATA FRANK N STONE,DOCTOR,"BAD BUSINESS, THIS.","DON'T LIKE IT AT ALL" 680 DATA PIGGY FANSHAW,TWIT,"I SAY, EXCITING, WHAT?","JOLLY BAD SHOW, OLD MAN" 690 DIMW(12),X(12) 700 R%=FNR(24)+1 710 FORI=1TO12:W%=FNR(25) 720 X%=FNR(25):IFX%=R%GOTO720 730 W(I)=W%:X(I)=X%:NEXTI 740 GOSUB2000:M%=FNR(12):X(M%)=0:X=R% 750 G%=FNR(3):ONG%GOTO780,810 760 FORI=1TO11:X=X(I):FORJ=I+1TO12:IFX=X(J)GOTO810 770 NEXTJ,I:G%=1 780 Z%=1:X=FNR(25):FORI=1TO12:IFX(I)=XGOTO810 790 NEXTI 800 Z%=FNR(12):IFM%=Z%GOTO800 810 X(M%)=-X:GOSUB2000:FORI=1TO12 820 S(I)=FNR(12):NEXTI 830 GOSUB2080:R=1:PRINT"[147]" 840 PRINT "YOU ARE IN THE ";R$(R) 850 PRINT:FORI=1TO12:IFW(I)<>RGOTO1020 860 PRINTN$(I);",THE ";C$(I);", IS HERE." 870 PRINT"THE ";C$(I);" SAYS: '"; 875 Z$=A$(I):IF R%(I)>0 THEN Z$="I ALREADY TOLD YOU: " 880 R%(I)=1:GOSUB4000:Z$=" I WAS IN THE ":GOSUB4000 890 X=ABS(X(I)):Z$=R$(X):GOSUB4000:Z$=" AT THE TIME ":GOSUB4000 900 IFI=M%ANDZ%=0GOTO960 910 W$="WITH THE ":F=0:FORJ=1TO12:IFI=JGOTO930 920 IFX=X(J)THENZ$=W$:GOSUB4000:Z$=C$(J):GOSUB4000:W$=" AND THE ":F=1 930 NEXTJ 940 IFF>0GOTO970 950 IFI=M%ANDZ%>0THENZ$=W$:GOSUB4000:Z$=C$(Z%):GOSUB4000:GOTO970 960 Z$="BY MYSELF":GOSUB4000 970 Z$=". ":GOSUB4000 980 S%=S(I):IFS%=M%THENZ$="MAYBE IT WAS SUICIDE":GOSUB4000:GOTO1010 990 IFABS(X(S%))=XTHENZ$="I DUNNO WHO COULD HAVE DONE IT":GOSUB4000:GOTO1010 1000 Z$="I SUSPECT THE ":GOSUB4000:Z$=C$(S%):GOSUB4000 1010 Z$=". ":GOSUB4000:Z$=B$(I):GOSUB4000:PRINT".'":PRINT:FORJ=1TO2E3:NEXT 1020 NEXTI 1030 IFR%<>RGOTO1070 1040 PRINT"THERE IS A DEAD BODY HERE" 1050 PRINT Y$(Y%);"." 1060 PRINT"THE BODY SAYS: NOTHING":PRINT 1070 M$=M$(R) 1080 PRINT"YOU MAY  ACCUSE [146], OR PROCEED TO:" 1090 FORI=1TOLEN(M$):J=ASC(MID$(M$,I))-64:PRINTR$(J):NEXTI 1100 PRINT 1110 INPUT"YOUR MOVE [191][157][157][157]";X$ 1120 IF LEN(X$)<3GOTO1080 1130 X$=LEFT$(X$,3):IFX$="ACC"GOTO1170 1140 FORI=1TOLEN(M$):J=ASC(MID$(M$,I))-64 1150 IFLEFT$(R$(J),3)=X$THENR=J:GOTO840 1160 NEXTI:GOTO1080 1170 PRINT"VERY WELL, ";K$(K%):PRINT" YOU ACCUSE THE..."; 1180 INPUTA$:IFLEN(A$)<3GOTO1080 1190 A$=LEFT$(A$,3):FORI=1TO12:IFA$<>LEFT$(C$(I),3)THENNEXTI:GOTO1080 1200 IFI=M%GOTO1250 1210 PRINT"BUNGLER! IT'S NOT THE ";C$(I);"!" 1220 K%=K%+1:IFK%>4GOTO1270 1230 PRINT"YOU ARE DEMOTED TO ";K$(K%);"!" 1240 PRINT"GO BACK AND TRY TO GET THE RIGHT ONE!":GOTO1080 1250 PRINT" RIGHT! [146] ANOTHER CRIMINAL SPEEDILY" 1260 PRINT"BROUGHT TO JUSTICE!" 1270 PRINT:PRINT " SOLUTION:" 1280 PRINT "THE ";C$(M%); 1290 IF R%(M%)=0 THEN PRINT " WOULD HAVE"; 1300 IF G%=2 THEN Z$=" ADMITTED BEING IN THE MURDER ROOM!":GOTO 1390 1310 Z$=" CLAIMED TO BE IN THE ":GOSUB 4000 1320 X=ABS(X(M%)):Z$=R$(X):GOSUB4000 1330 W$=" WITH THE ":IF Z%=0 THEN W$=" ALONE. BUT THE " 1340 F=0:FOR J=1 TO 12:IF M%=J GOTO 1360 1350 IFX=X(J)THENZ$=W$:GOSUB4000:Z$=C$(J):GOSUB4000:W$=" AND THE ":F=1 1360 NEXTJ:IF F=0 AND Z%>0 THEN F=1:Z$=W$:GOSUB4000:Z$=C$(Z%):GOSUB4000 1370 IF F=1 THEN Z$=" ... WHO WON'T BACK UP THIS ALIBI." 1380 IF Z%=0 THEN Z$=" WERE THERE..." 1390 GOSUB 4000 1400 PRINT:END 2000 N=INT((RND(1)*30)) 2010 L=FNR(6)*2 2020 PRINT"";LEFT$(DN$,L) 2030 GOSUB3010 2040 FORI=L+9TO20 2050 IFI>15ANDI<19THENPRINTTAB(N+1)"[166][219][219][166][165]":GOTO2070 2060 PRINTTAB(N+1)"[166][166][166][166][165]" 2070 NEXT:RETURN 2080 FORJ=0TO15+RND(1)*8:GOSUB2000:NEXTJ 2090 PRINT""DN$;LEFT$(DN$,6) 2100 PRINTTAB(N+1)"[169] [223]" 2110 FORI1=1TO4:PRINTTAB(N+1)"[165][215][167]":NEXT 2120 PRINT"WELCOME TO GRUNGY TOWERS" 2130 PRINT"HIT ANY KEY TO START THE GAME" 2140 GETC$:IFC$=""THEN2140 2150 RETURN 3000 M$(J)=M$(J)+CHR$(I+64):M$(I)=M$(I)+CHR$(J+64):RETURN 3010 PRINTTAB(N+2)"[167][190]" 3020 PRINTTAB(N+2)"[169][223]" 3030 PRINTTAB(N+1)"[169] [223]" 3040 PRINTTAB(N)"[188][192][192][192][192][146][190]" 3050 PRINTTAB(N+1)"[191][191][191][191][165]" 3060 PRINTTAB(N+1)"[191][169][223][191][165]" 3070 PRINTTAB(N+1)"[191][165][167][191][165]" 3080 PRINTTAB(N+1)"[191][204][186][191][165]" 3090 PRINTTAB(N+1)"[191][187][187][146][191][165]" 3100 RETURN 4000 Z=39-POS(0):IFLEN(Z$)<=ZTHENPRINTZ$;:RETURN 4010 IFZ<2THENPRINT:GOTO4000 4020 FORZ1=ZTO1STEP-1:IFMID$(Z$,Z1,1)<>" "THENNEXTZ1 4030 IFZ1=0THENPRINT:GOTO4000 4040 PRINTLEFT$(Z$,Z1):PRINTMID$(Z$,Z1+1);:RETURN