210 PRINT "BILL, MARY, PAUL, SUZY, AND JOHN WERE","HOUSE GUESTS. THEIR HOST WAS MURDERED","BETWEEN THE HOURS OF 1 PM AND 9 PM."
220 PRINT "YOUR TASK IS TO DETERMINE THE KILLER,","TIME, AND ROOM LOCATION OF THE CRIME.","YOU HAVE A HOUSE DIAGRAM AND A LIST OF QUESTIONS FOR THE SUSPECTS. THE GUILTY PERSON MAY TRY TO MISLEAD YOU."
250 PRINT : PRINT "PRESS ANY KEY. ";: GET A$: HOME
260 PRINT "HOUSE DIAGRAM: O=WINDOWS"
310 H = 0:C = 0:C1 = 0: PRINT ",---------------------------,": PRINT "! ! TROPHY O !": PRINT "! DINING O ! GARAGE !": PRINT "! '---,- --! !"
615 IF LEFT$(S1$,6) = "SOLVED" OR RIGHT$(S1$,6) = "SOLVED" THEN 1200
620 ZA$ = S1$: GOSUB 120:S = PP: IF S = 0 THEN 610
630 HOME
640 PRINT "WHICH NUMBERED QUESTION WILL YOU ASK",S$(S)"?": PRINT : PRINT "1. WHEREABOUTS AND WHAT "S$(S)" SAW AT A"," CERTAIN TIME?",,"2. WHEN "S$(S)" WAS EVER IN A CERTAIN ROOM?"
650 VTAB 21
680 PRINT "3. YOU MAKE A CONFRONTATION BECAUSE"," PART OF THE CRIME IS NOW SOLVED.": PRINT : GET AX$: IF AX$ < >"1" AND AX$ < >"2" AND AX$ < >"3" THEN 630
690 A = VAL(AX$)
700 C = C +1: ON A GOTO 720,990,1200
720 HOME : PRINT S$(S)", WHERE WERE YOU AT PM?": VTAB PEEK(37): HTAB 25: GET TX$
730 VTAB PEEK(37) +1: HTAB 25: PRINT TX$
745 IF TX$ < >"1" AND TX$ < >"2" AND TX$ < >"3" AND TX$ < >"4" AND TX$ < >"5" AND TX$ < >"6" AND TX$ < >"7" AND TX$ < >"8" AND TX$ < >"9" THEN 720
747 T1 = VAL(TX$)
750 PRINT
760 R1 = P(S,T1): IF S < >M THEN 865
790 IF RND(2) <.7 THEN 865
800 R1 = INT(6 * RND(3)) +1: IF RND(3) >.16 THEN 865
810 PRINT "I WAS WITH OUR HOST.": IF RND(4) >T1 *.1 +.1 THEN 840
820 PRINT "OUR HOST WAS DEAD.": GOTO 910
840 PRINT "OUR HOST WAS STILL ALIVE.": GOTO 910
865 IF (T1 <T) AND R1 = Q(T1) THEN PRINT "I WAS WITH OUR HOST.",,"OUR HOST WAS STILL ALIVE.": GOTO 910
870 IF (T1 > = T) AND R1 = R AND (S < >M OR (S = M AND RND(1) <.5)) THEN PRINT "I WAS WITH OUR HOST.",,"OUR HOST WAS DEAD."
910 PRINT "I WAS IN THE ";R$(R1);" ROOM."
920 FOR K = 1 TO 5: IF K = S THEN 960
940 IF P(K,T1) = R1 THEN PRINT "I WAS WITH "S$(K)"."
950 IF ABS(R1 -P(K,T1)) = 1 THEN PRINT "I SAW "S$(K)" THROUGH A WINDOW."
960 NEXT : GOTO 610
990 HOME : PRINT S$(S)", WHEN WERE YOU IN THE ROOM?": VTAB PEEK(37): HTAB (27): INPUT " ";ZA$:ZA$ = LEFT$(ZA$,6): VTAB PEEK(37): HTAB 35: PRINT "ROOM?"
1010 GOSUB 140:T1 = PP
1020 IF NOT T1 THEN 990
1025 PRINT
1030 IF S < >M THEN 1110
1040 IF RND(5) <.5 THEN 1110
1050 T1 = INT( RND(5) *6) +1
1090 PRINT "I WAS NEVER IN THAT ROOM.": GOTO 610
1110 K = 0: FOR B = 1 TO 9: IF P(S,B) = T1 THEN PRINT "I WAS IN THAT ROOM AT "B" PM.":K = 1
1120 NEXT : IF NOT K THEN PRINT "I WAS NEVER IN THAT ROOM."
1130 GOTO 610
1200 C1 = C1 +1
1205 HOME
1210 PRINT "IT IS TIME FOR THE CONFRONTATION.","INSPECTOR CLOUSEAU, WHAT HAVE YOU FOUND?"
1220 PRINT "1. THE KILLER.",,,"2. THE MURDER ROOM.",,"3. THE TIME OF THE MURDER.","4. YOU ARE TOTALLY BAFFLED AND GIVE UP.": PRINT : GET AX$: IF AX$ < >"1" AND AX$ < >"2" AND AX$ < >"3" AND AX$ < >"4" THEN 1205
1230 A = VAL(AX$): HOME
1260 ON A GOTO 1270,1420,1350,1550
1270 INPUT "WHO IS THE KILLER? ";ZA$: GOSUB 120: IF NOT PP THEN HOME : GOTO 1270
1280 IF PP < >M THEN PRINT : GOTO 1530
1285 VTAB M +2: HTAB 35: INVERSE : PRINT S$(M): NORMAL : HOME
1290 PRINT "YOU HAVE DETERMINED THE KILLER.":H = H +1: IF EG THEN PRINT : PRINT "INSPECTOR, YOU DO REMEMBER THAT YOU","DETERMINED THE KILLER EARLIER?":H = H -1
1295 EG = 1
1300 IF H = 7 THEN 1500
1340 GOTO 610
1350 HOME : PRINT "WHAT WAS THE TIME OF THE MURDER? ";: GET AX$: VTAB PEEK(37) +1: HTAB 34: PRINT AX$" PM."
1353 IF AX$ < >"1" AND AX$ < >"2" AND AX$ < >"3" AND AX$ < >"4" AND AX$ < >"5" AND AX$ < >"6" AND AX$ < >"7" AND AX$ < >"8" AND AX$ < >"9" THEN PRINT : GOTO 1350
1355 T1 = VAL(AX$)
1360 IF T1 < >T THEN PRINT : GOTO 1530
1370 PRINT
1380 PRINT "YOU DETERMINED THE CORRECT MURDER TIME.":H = H +2: IF RT THEN PRINT : PRINT "INSPECTOR, YOU DO REMEMBER THAT YOU","DETERMINED THE MURDER TIME EARLIER?":H = H -2
1420 HOME : INPUT "WHERE WAS THE HOST MURDERED? ";ZA$: GOSUB 140: IF NOT PP THEN 1420
1430 IF PP < >R THEN PRINT : GOTO 1530
1435 VTAB 11: HTAB 34: INVERSE : PRINT R$(R): HTAB 35: PRINT "ROOM": NORMAL : HOME
1440 PRINT "YOU HAVE DETERMINED THE MURDER ROOM.":H = H +4: IF WS THEN PRINT : PRINT "INSPECTOR, YOU DO REMEMBER THAT YOU","DETERMINED THE MURDER ROOM EARLIER?":H = H -4
1450 WS = 1: IF H < >7 THEN 610
1500 FOR XT = 1 TO 3300: NEXT : HOME : PRINT "INSPECTOR CLOUSEAU, YOU SOLVED THE CASE.IT TOOK YOU "C" QUESTIONS AND "C1,"CONFRONTATIONS. YOUR RATING IS ";:RT = C * -25 +C1 *C1 * -25 +1000: PRINT RT"."
1505 IF RT > = 700 THEN PRINT "INSPECTOR, YOU ARE REALLY INCREDIBLE!": GOTO 1590
1510 IF RT > = 600 THEN PRINT "INSPECTOR, YOU ARE INCREDIBLE!": GOTO 1590
1515 IF RT > = 500 THEN PRINT "INSPECTOR, YOU ARE ALMOST AMAZING!": GOTO 1590
1517 IF RT > = 200 THEN PRINT "INSPECTOR, YOU ARE PRETTY GOOD!": GOTO 1590
1520 IF RT > = 0 THEN PRINT "FINE WORK, INSPECTOR.": GOTO 1590
1523 IF RT > = -1000 THEN PRINT "YOU FUMBLED THIS ONE, INSPECTOR.": GOTO 1590
1525 PRINT "THAT WAS REALLY STUPID WORK, INSPECTOR.": GOTO 1590
1530 PRINT "INSPECTOR CLOUSEAU, YOU ARE WRONG.": GOTO 610
1550 HOME : PRINT "YOU FUMBLED THIS ONE, INSPECTOR.": PRINT : PRINT "THE FACTS ARE: "S$(M)" KILLED THE HOST AT "T" O'CLOCK IN THE "R$(R)" ROOM."
1590 PRINT : INPUT "DO YOU WANT A NEW CASE? ";A$: IF A$ = "Y" OR A$ = "YES" THEN 5
1600 IF A$ < >"N" AND A$ < >"NO" THEN HOME : GOTO 1590