10 REM* FROM NORTH STAR USERS GROUP 20 REM* ADAPTED FOR SOL BY DAVID FOX - MARIN COMPUTER CENTER 25 REM***COPYRIGHT BY CREATIVE COMPUTING 30 PRINT "&K" 40 CURSOR 6,10: PRINT "* * * H U N T T H E W U M P U S * * *" 50 DIM L0(21),L2(21),L3(21): LET L1=20 60 DEF FNA(X)=INT(RND(0)*X+1) 70 CURSOR 15,0 80 INPUT ,(1,0)"Care for the Rules? ",A$ 90 IF A$="Y" THEN GOSUB 850 100 CURSOR 15,0 110 INPUT "Please enter a random number: ",R1: PRINT "&K" 120 IF R1=0 THEN LET R1=123 130 LET R1=(ABS(R1)+1)/10: IF R1>1 THEN 130 140 LET R1=RND(R1) 150 FOR I=1 TO L1: READ L3(I): NEXT I 160 DATA 148,185,160,120,105,205,228,248,268,285 170 DATA 283,260,240,220,203,303,328,368,383,340 180 FOR I=1 TO L1: READ L2(I): NEXT I 190 DATA 20508,010310,20412,30514,10406,50715,60817,10709 200 DATA 81018,20911,101219,31113,121420,41315,61416 210 DATA 151720,71618,91719,111820,131619 220 PRINT "&KTHE WUMPUS IS RUNNING TO HIDE." 230 FOR I=1 TO L1: LET L0(I)=I: NEXT I 240 FOR I=L1 TO 2 STEP -1 250 LET J=FNA(I)+1: LET K=L0(I): LET L0(I)=L0(J): LET L0(J)=K: NEXT I 260 LET W1=FNA(L1): LET B1=FNA(L1) 270 LET B2=FNA(L1) 280 IF B1=B2 THEN 270 290 LET H1=FNA(L1) 300 IF H1=B2 THEN 290 310 IF H1=B1 THEN 290 320 LET P1=FNA(L1) 330 IF P1=W1 OR P1=B1 OR P1=B2 OR P1=H1 THEN GOTO 320 340 GOSUB 770 350 GOSUB 790: LET D5=D4 360 PRINT : IF P1<>W1 THEN 400 370 PRINT "LOOK OUT, IT'S THE WUMPUS ROOM!!!!" 380 PRINT "TOO LATE. YOU'VE BEEN EATEN." 390 GOTO 660 400 IF P1<>B1 AND P1<>B2 THEN 420 410 PRINT "SUPER BATS!!!": PRINT "WHOOOOOSH": GOTO 320 420 IF P1<>H1 THEN 490 430 PRINT "&KLOOK OUT! BOTTOMLESS PIT!!" 440 SET DS=3 450 PRINT "A I": PRINT TAB(5);"E": PRINT TAB(7);"E" 460 PRINT TAB(8);"E": FOR I=1 TO 6: PRINT " E": NEXT I 470 SET DS=0 480 GOTO 660 490 GOSUB 790 500 IF D4D5 THEN PRINT "YOU ARE FARTHER FROM THE WUMPUS." 520 LET D5=D4 530 LET P0=W1: GOSUB 750: IF K0 THEN PRINT "I SMELL A WUMPUS." 540 LET P0=B1: GOSUB 750: LET K1=K0: LET P0=B2: GOSUB 750 550 IF K0+K1 THEN PRINT "I HEAR BATS." 560 LET P0=H1: GOSUB 750: IF K0 THEN PRINT "I FEEL A DRAFT OF PITS." 570 PRINT : PRINT "THIS IS ROOM ";L0(P1);" ADJACENT TO "; 580 PRINT L0(P5);", ";L0(P6);", ";L0(P7) 590 INPUT (1,0)"SHOOT OR MOVE: ",A1$: IF LEN(A1$)=0 THEN 590 600 IF A1$="M" THEN 700 610 IF A1$(1,1)<>"S" THEN 590 620 INPUT "INTO WHICH ROOM? ",P2 630 GOSUB 730: IF NOT K0 THEN 580 640 IF P2<>W1 THEN 680 650 PRINT : PRINT "HURRAH! ONE LESS WUMPUS." 660 PRINT : PRINT : INPUT (1,0)"CARE FOR ANOTHER GAME? ",A1$ 670 IF A1$="Y" THEN 220 ELSE 820 680 LET W1=FNA(L1): PRINT : PRINT "MISSED!" 690 PRINT "WUMPUS IS MOVING.": GOTO 420 700 INPUT "MOVE TO: ",P2 710 GOSUB 730: IF K0 THEN LET P1=P2 ELSE 580 720 GOSUB 770: GOTO 360 730 LET P0=L1+1: FOR I=1 TO L1: IF L0(I)=P2 THEN LET P0=I 740 NEXT I: LET P2=P0 750 IF P0=P5 OR P0=P6 OR P0=P7 THEN LET K0=1 ELSE LET K0=0 760 RETURN 770 LET P4=L2(P1): LET P5=INT(P4/10000): LET P4=P4-10000*P5 780 LET P6=INT(P4/100): LET P7=P4-100*P6: RETURN 790 LET D6=L3(P1): LET D7=L3(W1): LET D0=0: FOR I=1 TO 3 800 LET D8=INT(D6/10): LET D9=INT(D7/10): LET D6=D6-D7-10*(D8-D9) 810 LET D0=D0+D6*D6: LET D6=D8: LET D7=D9: NEXT I: LET D4=SQR(D0): RETURN 820 PRINT "&K": CURSOR 5,10: PRINT "Thank you for playing with me!!" 830 PRINT : PRINT : PRINT "Type `RUN' and then press `RETURN' for a new game" 840 CURSOR 14,0: END 850 REM* RULES 860 PRINT "&K" 870 PRINT "The Wumpus is a shy, timid person-eating animal. It lives in" 880 PRINT "one of 20 connecting rooms. The object is to find and shoot" 890 PRINT "the Wumpus with your bow and arrows.": PRINT 900 PRINT "In some of the rooms are super bats. If you walk into their" 910 PRINT "room, they will pick you up and drop you into one of the rooms" 920 PRINT "randomly.": PRINT 930 PRINT "Also some of the rooms contain bottomless pits. Falling into" 940 PRINT "one will cause a sudden attack of death.": PRINT 950 PRINT "The Wumpus will stay in one place unless disturbed by the sound" 960 PRINT "of an arrow shooting through a room.": CURSOR 15,10 970 INPUT "Press `RETURN' to continue ",A$ 980 PRINT "&KTo help you in your quest are the following aids:" 990 PRINT "1) If you are in a room adjoining the Wumpus's room," 1000 PRINT " `I SMELL A WUMPUS' is printed out." 1010 PRINT "2) If you are in a room adoining the bat's room," 1020 PRINT " `I HEAR BATS' is printed out." 1030 PRINT "3) If an adjoining room contains bottomless pits," 1040 PRINT " `I FEEL A DRAFT OF PITS' is printed out." 1050 PRINT "4) As you move, you are told whether your new room number is" 1060 PRINT " closer or farther to the Wumpus's room number than your last" 1070 PRINT " room number. If they are the same distance, no message is" 1080 PRINT " printed. The numbering of the rooms is random and some of" 1090 PRINT " the passages go only in one direction." 1100 PRINT : PRINT "Have fun and good hunting!" 1110 RETURN