Listing of file='WUMPII.BAS;01' on disk='vmedia/ncc_3-sector.ccvf'
5 PLOT 12,14 7 DIM S(20,3) 10 PRINT TAB( 20);"W U M P U S II" 20 PLOT 15 30 PRINT TAB( 10);"ADOPED BY WILLIAM LEE FOR COMPUCOLOR II" 40 PRINT 50 INPUT "WOULD YOU LIKE A SHOT AT THE INSTRUCTIONS? ";I$ 60 IF LEFT$ (I$,1)< > "Y"THEN 130 100 GOSUB 700 110 REM ---------CHOOSE AND SET UP CAVE------- 130 GOSUB 2530 140 DEF FN A(X)= INT (20* RND (1))+ 1 150 DEF FN B(X)= INT (3* RND (1))+ 1 160 DEF FN C(X)= INT (4* RND (1))+ 1 170 REM LOCATE L ARRAY ITEMS 180 REM 1-YOU,2-WUMPUS,3&4-PITS,5&6-BATS 210 FOR J= 1TO 6 220 L(J)= FN A(0) 230 M(J)= L(J) 240 NEXT J 250 REM CHECK FOR CROSSOVERS(IE L(1)=L(2) ETC) 260 FOR J= 1TO 6 270 FOR K= JTO 6 280 IF J= KTHEN 300 290 IF L(J)= L(K)THEN 210 300 NEXT K 310 NEXT J 320 REM SET # ARROWS 330 A= 5 340 L= L(1) 350 REM RUN THE GAME 360 PRINT :PRINT "HUNT THE WUMPUS" 370 REM - HAZARDS WORNINGS AND LOCATION 380 GOSUB 1230 390 REM MOVE OR SHOOT 400 GOSUB 1400 410 ON OGOTO 430,470 420 REM SHOOT 430 GOSUB 1550 440 IF F= 0THEN 400 450 GOTO 490 460 REM MOVE 470 GOSUB 2150 480 IF F= 0THEN 380 490 IF F> 0THEN 540 500 REM - LOSE 510 PRINT :PRINT "HA HA HA - YOU LOOSE!" 520 GOTO 550 530 REM WIN 540 PRINT "HEE HEE HEE - THE WUMPUS'LL GET YOU NEXT TIME!!" 550 FOR J= 1TO 6 560 L(J)= M(J) 570 NEXT J 580 PRINT :PRINT "WANT TO PLAY AGAIN "; 590 INPUT I$ 595 PRINT 600 PRINT 620 IF LEFT$ (I$,1)< > "Y"THEN 3310 640 PRINT "SAME SET-UP "; 650 INPUT I$ 660 PRINT 670 IF LEFT$ (I$,1)< > "Y"THEN 130 680 GOTO 330 700 REM ---------INSTRUCTIONS--------- 710 PRINT :PRINT TAB( 18);"WELCOME TO WUMPUS II" 720 GOSUB 4000:REM DESCRIPTION 725 REM CAVES 730 PRINT "THIS VERSION GIVES YOU A CHOICE OF CAVES TO PLAY IN. SOME CAVES" 740 PRINT "ARE EASIER THAN OTHERS. ALL CAVE HAVE 20 ROOMS AND 3 TUNNELS" 750 PRINT "LEADING FROM ONE ROOM TO OTHER ROOMS":PRINT 760 PRINT "THE CAVES ARE:" 770 PRINT " 0 - DODECAHEDRON THE ROOMS OF THIS CAVE ARE ON A 12-SIDED" 780 PRINT " OBJECT, EACH FORMING A PENTAGON. THE ROOMS" 790 PRINT " ARE AT THE CORNERS OF THE PENTAGONS. EACH" 800 PRINT " ROOM HAVING TUNNELS THAT LEAD TO 3 OTHER" 805 PRINT " ROOMS":PRINT 807 INPUT "HIT RETURN TO CONTUINE";Z$ 808 PLOT 12 810 PRINT " 1 - MOBIUS STRIP THIS CAVE IS TWO ROOMS WIDE AND 10 ROOMS " 820 PRINT " AROUND (LIKE A BELT). YOU WILL NOTICE" 830 PRINT " THERE IS A HALF TWIST SOMEWHERE.":PRINT 840 PRINT " 2 - STRING OF BEADS FIVE BEADS IN A CIRCLE. EACH BEAD IS A" 850 PRINT " DIAMOND WITH A VERTICAL CROSS-BAR. THE" 860 PRINT " RIGHT & LEFT CORNERS LEAD TO " 870 PRINT " NEIGHBORING BEADS. (THIS ONE IS " 880 PRINT " DIFFICULT TO PLAY)":PRINT 890 PRINT " 3 - HEX NEWORK IMAGINE A HEX TILE FLOOR. TAKE A RECTANGLE" 900 PRINT " WITH 20 POINTS (INTERSECTIONS) INSIDE (4*4)." 910 PRINT " JOIN RIGHT & LEFT SIDES TO MAKE A TORUS" 920 PRINT " (DOUGHNUT). HAVE FUN IMAGINING THIS ONE!!":PRINT 930 PRINT " CAVES 1-3 ARE REGULAR IN A SENSE THAT EACH ROOM GOES TO THREE" 940 PRINT "OTHER ROOMS & TUNNELS ALLOW TWO-WAY TRAFFIC. HERE ARE SOME " 950 PRINT "'IRREGULAR' CAVES:":PRINT 960 PRINT " 4 - DENDRITE WITH DEGENRACIES PULL A PLANT FROM THE GROUND." 970 PRINT " THE ROOTS & AND BRANCHES FORM" 980 PRINT " A DENDIRE - IE., THERE ARE NO" 990 PRINT " LOOPING PATHS DEGENERACY " 1000 PRINT " MEANS A) SOME ROOMS CONNECT " 1010 PRINT " TO THEMSLEVES AND B) SOME " 1020 PRINT " ROOM HAVE MORE THAN ONE " 1030 PRINT " TUNNEL TO THE SAME OTHER ROOM" 1040 PRINT " IE, 12 HAS TWO TUNNELS TO 13.":PRINT 1050 INPUT "HIT RETURN TO CONTUINE";Z$ 1060 PLOT 12 1070 PRINT " 5 - ONE WAY LATTICE HERE ALL TUNNELS GO ONE WAY ONLY. TO" 1080 PRINT " RETURN, YOU MUST GO AROUND THE CAVE" 1090 PRINT " (ABOUT 5 MOVES).":PRINT 1100 PRINT " 6 - ENTER YOUR OWN THE COMPUTER WILL ASK YOU THE ROOMS " 1110 PRINT " IN THE CAVE. FOR EXAMPLE: ROOM #1?" 1120 PRINT " 2,3,4 -YOUR REPLY OF 2,3,4 MEANS" 1130 PRINT " ROOM 1 HAS TUNNELS GOING TO ROOMS 2,3,4":PRINT 1140 PRINT TAB( 20)"HAPPY HUNTING!" 1225 RETURN 1230 REM - HAZARDS WARNINGS AND LOCATION 1240 PRINT 1250 FOR J= 2TO 6 1260 FOR K= 1TO 3 1270 IF S(L(1),K)< > L(J)THEN 1340 1280 ON J- 1GOTO 1290,1310,1330,1330 1290 PRINT :PRINT "I SMELL A WUMPUS! " 1300 GOTO 1340 1310 PRINT :PRINT "I FEEL A DRAFT! " 1320 GOTO 1340 1330 PRINT :PRINT "BATS NEARBY! " 1340 NEXT K 1350 NEXT J 1360 PRINT :PRINT "YOU ARE IN ROOM ";L(1); 1370 PRINT :PRINT "TUNNELS LEAD TO "S(L,1);S(L,2);S(L,3) 1380 PRINT 1390 RETURN 1400 REM CHOOSE OPION MOVE OR SHOOT 1410 GOTO 1450 1420 PRINT :PRINT "ERROR " 1450 PRINT "SHOOT OR MOVE "; 1460 INPUT I$ 1470 PRINT 1490 IF LEFT$ (I$,1)< > "S"THEN 1520 1500 O= 1 1510 RETURN 1520 IF LEFT$ (I$,1)< > "M"THEN 1420 1530 O= 2 1540 RETURN 1550 REM ARROW ROUTINE 1560 F= 0 1570 REM - PATH OF ARROW 1590 GOTO 1630 1600 PRINT :PRINT "ERROR " 1620 PRINT 1630 PRINT "NUMBER OF ROOMS (1 TO 5) "; 1640 INPUT J9 1650 PRINT 1670 IF J9< 1OR J9> 5OR INT (J9)< > ABS (J9)THEN 1600 1680 FOR K= 1TO J9 1690 PRINT "ROOM # "; 1700 INPUT P(K) 1710 PRINT 1730 IF P(K)> 0AND P(K)< 21AND INT (P(K))= ABS (P(K))THEN 1780 1740 PRINT :PRINT "ERROR "; 1760 PRINT 1770 GOTO 1690 1780 NEXT K 1790 PRINT 1800 REM SHOOT ARROW 1810 A= A- J9 1820 A9= L(1) 1830 FOR K= 1TO J9 1840 FOR K1= 1TO 3 1850 IF S(A9,K1)= P(K)THEN 1990 1860 NEXT K1 1870 REM NO TUNNEL FOR THE ARROW 1880 A9= S(A9,FN B(1)) 1890 GOTO 2000 1900 NEXT K 1910 PRINT "-----> -----> ----->":FOR Q= 1TO 200:NEXT Q 1911 REM 1913 PRINT " MISSED" 1920 REM MOVE WUMPUS 1930 GOSUB 2070 1940 REM - AMMO CHECK 1950 IF A> 0THEN 1970 1955 PRINT :PRINT "YOU HAVE USED ALL OF YOUR ARROWS." 1960 F= - 1 1970 RETURN 1980 REM SEE OF ARROW IS AT L(1) OR L(2) 1990 A9= P(K) 2000 IF A9< > L(2)THEN 2040 2010 PRINT :PRINT "AHA!! YOU GOT THE WUMPUS! HE WAS IN ROOM ";L(2) 2020 F= 1 2030 RETURN 2040 IF A9< > L(1)THEN 1900 2050 PRINT :PRINT "OUCH!! ARROW GOT YOU!" 2060 GOTO 1960 2070 REM - MOVE WUMPUS ROUTINE 2080 K= FN C(0) 2090 IF K= 4THEN 2140 2100 L(2)= S(L(2),K) 2110 IF L(2)< > LTHEN 2140 2120 PRINT :PRINT "TSK TSK TST - WUMPUS GOT YOU!" 2130 F= - 1 2140 RETURN 2150 REM - MOVE ROUTINE 2160 F= 0 2170 GOTO 2210 2180 PRINT :PRINT "ERROR " 2200 PRINT 2210 PRINT "WHERE TO "; 2220 INPUT L 2230 PRINT "" 2240 IF L< 1OR L> 20OR ABS (L)< > INT (L)THEN 2180 2250 FOR K= 1TO 3 2260 REM -CHECK IF LEGAL MOVE 2270 IF S(L(1),K)= LTHEN 2350 2280 NEXT K 2290 IF L= L(1)THEN 2350 2300 PRINT :PRINT "NOT POSSIBE - "; 2320 PRINT 2330 GOTO 2210 2340 REM - CHECK FOR HAZARDS 2350 L(1)= L 2360 REM -WUMPUS 2370 IF L< > L(2)THEN 2430 2380 PRINT :PRINT "... OOPS! BUMPED A WUMPUS! " 2390 REM -MOVE A WUMPUS 2400 GOSUB 2080 2410 IF F= 0THEN 2430 2420 REM -PIT 2430 IF L< > L(3)AND L< > L(4)THEN 2480 2440 PRINT "Y":PRINT " Y":PRINT " Y":PRINT " I":PRINT " I" 2441 PRINT " I":PRINT " E":PRINT " E":PRINT " E" 2442 PRINT " E" 2443 PRINT " . . . FELL IN A PIT" 2450 F= - 1 2460 RETURN 2470 REM - BATS 2480 IF L< > L(5)AND L< > L(6)THEN 2520 2490 PRINT :PRINT "ZAP--SUPER BAT SNATCH! ELESWHERESVILLE FOR YOU!" 2500 L= FN A(1) 2510 GOTO 2350 2520 RETURN 2530 REM --------SELECT CAVE----------- 2540 GOTO 2580 2550 PRINT "ERROR - PLEASE TRY AGAIN" 2580 PRINT :PRINT "CAVE #(0-6) "; 2585 RESTORE 2590 INPUT N 2600 PRINT 2620 IF N< 0OR N> 6OR INT (N)< > ABS (N)THEN 2550 2630 ON N+ 1GOSUB 2650,2730,2810,2890,2970,3050,3130 2640 RETURN 2650 REM - DODECAHEDRON 2660 PRINT :PRINT "YOU HAVE SELECTED - DODECAHEDRON" 2670 DATA 2,5,8,1,3,10,2,4,12,3,5,14,1,4,6 2680 DATA 5,7,15,6,8,17,1,7,9,8,10,18,2,9,11 2690 DATA 10,12,19,3,11,13,12,14,20,4,13,15,6,4,16 2700 DATA 15,17,20,7,16,18,9,17,19,11,18,20,13,16,19 2710 GOSUB 3240 2720 RETURN 2730 REM - MOBUS STRIP 2733 PRINT :PRINT "YOU HAVE SELECTED - MOBIUS STRIP" 2735 FOR B1= 1TO 1 2737 FOR B2= 1TO 60 2740 READ B0 2742 NEXT B2 2744 NEXT B1 2750 DATA 20,2,3,19,1,4,1,4,5,2,3,6,3,6,7 2760 DATA 4,5,8,5,8,9,6,7,10,7,10,11,8,9,12 2770 DATA 9,12,13,10,11,14,11,14,15,12,13,16,12,16,17 2780 DATA 14,15,18,15,18,19,16,17,20,2,17,20,1,18,19 2790 GOSUB 3240 2800 RETURN 2810 REM - STRING OF BEADS 2813 PRINT :PRINT "YOU HAVE SELECTED - STRING OF BEADS" 2815 FOR B1= 1TO 2 2817 FOR B2= 1TO 60 2820 READ B0 2822 NEXT B2 2824 NEXT B1 2830 DATA 2,3,20,1,3,4,1,2,4,2,3,5,4,6,7 2840 DATA 5,7,8,5,6,8,6,7,9,8,10,11,9,11,12 2850 DATA 9,10,12,10,11,13,12,14,15,13,15,16,13,14,16 2860 DATA 14,15,17,16,18,19,17,19,20,17,18,20,1,18,19 2870 GOSUB 3240 2880 RETURN 2890 REM - HEX NUT ON TORUS 2893 PRINT :PRINT "YOU HAVE SELECTED - HEX NUT ON TORUS" 2895 FOR B1= 1TO 3 2897 FOR B2= 1TO 60 2900 READ B0 2902 NEXT B2 2904 NEXT B1 2910 DATA 6,10,16,6,7,17,7,8,18,8,9,19,9,10,20 2920 DATA 1,2,15,2,3,11,3,4,12,4,5,13,5,6,14 2930 DATA 7,16,20,8,16,17,9,17,18,10,18,19,6,19,20 2940 DATA 1,11,12,2,12,13,3,13,14,4,14,15,5,11,15 2950 GOSUB 3240 2960 RETURN 2970 REM - DENDITE W/ DEGENERACIES 2973 PRINT :PRINT "YOU HAVE SELECTED - DENDIRITE W/ DEGENERACIES 2975 FOR B1= 1TO 4 2977 FOR B2= 1TO 60 2980 READ B0 2982 NEXT B2 2984 NEXT B1 2990 DATA 1,1,5,2,2,5,3,3,6,4,4,6,1,2,7 3000 DATA 3,4,7,5,6,10,8,9,9,8,8,10,7,9,11 3010 DATA 10,13,14,12,13,13,11,12,12,11,15,16,14,17,18 3020 DATA 14,19,20,15,17,17,15,18,18,16,19,19,16,20,20 3030 GOSUB 3240 3040 RETURN 3050 REM - ONE WAY LATTICE 3053 PRINT :PRINT "YOU HAVE SELECTED - ONE WAY LATTICE 3055 FOR B1= 1TO 5 3057 FOR B2= 1TO 60 3060 READ B0 3062 NEXT B2 3064 NEXT B1 3070 DATA 5,4,8,1,5,6,2,6,7,3,7,8,8,9,12 3080 DATA 5,9,10,6,10,11,7,11,12,12,13,16,9,13,14 3090 DATA 10,14,15,11,15,16,16,17,20,13,17,18,14,18,19 3100 DATA 15,19,20,1,4,20,1,2,17,2,3,18,3,4,19 3110 GOSUB 3240 3120 RETURN 3130 REM - INPUT YOUR OWN CAVE 3135 PRINT :PRINT "YOU HAVE SELECTED TO ROLL YOUR OWN" 3140 FOR J= 1TO 20 3150 PRINT :PRINT "ROOM # ";J; 3160 INPUT S(J,1),S(J,2),S(J,3) 3170 FOR K= 1TO 3 3180 IF S(J,K)> 0AND S(J,K)< 21AND ABS (S(J,K))= ABS (S(J,K))THEN 3210 3190 PRINT :PRINT "****** ERROR!!!!!" 3200 GOTO 3150 3210 NEXT K 3220 NEXT J 3230 RETURN 3240 REM - INPUT CAVE 3250 FOR J= 1TO 20 3260 FOR K= 1TO 3 3270 READ S(J,K) 3280 NEXT K 3290 NEXT J 3300 RETURN 3310 LOAD "MENU":RUN 4000 REM DESCRIPTION 4010 PRINT :PRINT 4020 PRINT " THE WUMPUS LIVES IN A CAVE OF 20 ROOMS. EACH ROOM HAS 3 " 4030 PRINT "TUNNELS LEADING TO OTHER ROOMS. (LOOK AT A DODECAHEDRON TO SEE" 4040 PRINT "HOW THIS WORKS-IF YOU DON'T KNOW WHAT A DODECHADRON IS ,ASK" 4050 PRINT "SOMEONE * AND STAND BY FOR STRANGE TAILS)" 4060 PRINT 4070 PRINT " HAZARDS:" 4080 PRINT "BOTTOMLESS PITS - TWO ROOMS HAVE BOTTOMLESS PITS IN THEM IF YOU" 4090 PRINT " GO THERE, YOU FALL INTO THE PIT (&LOSE!)" 4100 PRINT "SUPERBATS - TWO OTHER ROOMS HAVE SUPER BATS. IF YOU GO THERE, A" 4110 PRINT " BAT GRABS YOU AND TAKES YOU TO SOME OTHER ROOM AT" 4120 PRINT " RANDOM. (WHICH MIGHT BE TROUBLESOME)" 4130 PRINT 4140 PRINT " WUMPUS:" 4150 PRINT " THE WUMPUS IS NOT BOTHERED BY HAZARDS (HE HAS SUCKER FEET " 4160 PRINT "AND IS TOO BIG FOR A BAT TO LIFT). USUALLY HE IS ASLEEP." 4170 PRINT "TWO THINGS CAN WAKE HIM UP:" 4180 PRINT "(1) YOUR ENTERING HIS ROOM" 4190 PRINT "(2) YOUR SHOOTING AN ARROW." 4200 PRINT " IF THE WUMPUS WAKES, HE MOVES (P=.75) ONE ROOM OR STAYS " 4210 PRINT "STILL (P=.25). AFTER THAT, IF HE IS WHERE YOU ARE, HE EATS" 4220 PRINT "YOU UP (& YOU LOSE!" 4230 INPUT "HIT RETURN TO CONTUINE";Z$ 4240 PLOT 12 4250 PRINT " YOU:" 4260 PRINT " EACH TURN YOU MAY MOVE OR SHOOT A CROOKED ARROW" 4270 PRINT " MOVING: YOU CAN GO ONE ROOM (THRU ONE TUNNEL)" 4280 PRINT " ARROWS:YOU HAVE 5 ARROWS. YOU LOSE WHEN YOU RUN OUT." 4290 PRINT " EACH ARROW CAN GO FROM 1 TO 5 ROOMS. YOU AIM BY " 4300 PRINT " TELLING THE COMPUTER THE ROOM'S YOU WANT THE ARROW " 4310 PRINT " TO GO TO. IF THE ARROW CAN'T GO THAT WAY (IE NO " 4320 PRINT " TUNNEL) IT MOVES AT RANDOM TO THE NEXT ROOM. IF " 4330 PRINT " THE ARROW HITS THE WUMPUS, YOU WIN!IF THE ARROW" 4340 PRINT " HITS YOU, YOU LOSE!" 4350 PRINT 4360 PRINT " WARNINGS:" 4370 PRINT " WHEN YOU ARE ONE ROOM AWAY FROM WUMPUS OR HAZARD, THE" 4380 PRINT "COMPUTER WILL SAY:" 4390 PRINT " WUMPUS - I SMELL A WUMPUS" 4400 PRINT " BATS - BATS NEARBY" 4410 PRINT " PIT - I FEEL A DRAFT" 4420 PRINT 4430 FOR I= 1TO 1000:NEXT I 4440 RETURN