home *** CD-ROM | disk | FTP | other *** search
GW-BASIC | 1984-07-09 | 14.5 KB | 773 lines |
- 10 ' ---------------------------------
- 20 ' -- TITLE: Funnels and Buckets
- 30 ' -- Copyright (C) 1984 by Data Sage
- 70 ' ---------------------------------
- 80 '
- 140 DEFINT A-Z
- 150 DQ = 5 : CL = 3 : AC = DQ * CL : CD$ = CHR$(27) : DO = -1
- 200 FJ = 1 : DP = 0 : AI = -1 : CJ = 1 : AJ = 0 : EB = 12
- 270 BQ = 11 : FI = 14 : FH = 15 : CY = 10 : BY = 3 : DA = 20
- 330 DJ = 5 : BA = 30 : BH = 4 : CN$ = CHR$(200)+CHR$(187)+" "+CHR$(201)+CHR$(188)
- 370 CO = LEN(CN$) : BS = 2 : CF = 15 : AK$ = " "
- 430 FE = 10
- 440 FD = 55
- 450 DIM FC$(5)
- 460 FC$(1) = "A"
- 470 FC$(2) = "S"
- 480 FC$(3) = "M"
- 490 FC$(4) = "D"
- 500 FC$(5) = "X"
- 510 DY = 11 : DX = 55 : EU = 12 : ES = 55 : DL = 19
- 560 DK = 10 : AF = 1<UNK! {0009}>: AE = 3 : EN = 1 : EK = 61
- 610 CU$ = CHR$(218)
- 620 EF$ = CHR$(191)
- 630 CR$ = CHR$(192)
- 640 ED$ = CHR$(217)
- 650 AP$ = CHR$(196)
- 660 AQ$ = CHR$(179)
- 670 CV$ = CHR$(201)
- 680 EG$ = CHR$(187)
- 690 BX$ = CHR$(205)
- 700 AX$ = CHR$(186)
- 710 AS$ = CHR$(200)+CHR$(205)+CHR$(205)+CHR$(205)+CHR$(205)+CHR$(205)+CHR$(205)+CHR$(205)+CHR$(205)+CHR$(205)+CHR$(205)+CHR$(205)+CHR$(205)+CHR$(188)
- 720 AO = 23
- 730 FA = AO - CL + 1
- 740 AY = 13
- 750 DIM CT(5)
- 760 CT(1) = 2 : CT(2) = 17 : CT(3) = 32 : CT(4) = 47 : CT(5) = 62
- 810 DIM AV(5)
- 820 DIM BM$(5, 3)
- 830 DIM EQ(5, 3)
- 840 DIM CE$(3)
- 850 CE$(1) = "\ | | | | /" : CE$(2) = "-- --" : CE$(3) = "/ | | | | \"
- 880 AL$ = " "
- 890 DH = 2
- 900 DIM CZ$(2)
- 910 CZ$(1) = CHR$(2)
- 920 CZ$(2) = CHR$(234)
- 930 BF = 2
- 940 DIM AZ$(2)
- 950 AZ$(1) = CHR$(1)
- 960 AZ$(2) = CHR$(19)
- 970 DIM ET$(6)
- 980 ET$(0) = "FASTEST "
- 990 ET$(1) = "FASTER "
- 1000 ET$(2) = "FAST "
- 1010 ET$(3) = "SLOW "
- 1020 ET$(4) = "SLOWER "
- 1030 ET$(5) = "SLOWEST "
- 1040 AM$ = " " : EV = 2
- 1060 BZ = 80 - (CO + 1)
- 1070 EY$ = "> > > F U N N E L S & B U C K E T S < < <"
- 1080 FG$ = "Version 1.00"
- 1090 BN$ = "Copyright (C) 1984 by Data Sage"
- 1100 EC$ = "All Rights Reserved"
- 1110 CG$ = "O3AAAAO4D4O3F+ABBBA;"
- 1120 CH$ = "O3GGBBAAAGF+4EED4D4;"
- 1130 ER$ = "O3CCA2G2F2E2F1;"
- 1140 DI$ = "O5C32E32G32;"
- 1150 BG$ = "O1E32F32D32;"
- 1160 '
- 1210 GOSUB 1920
- 1220 GOSUB 2190
- 1230 GOSUB 1570
- 1240 GOSUB 3320
- 1250 GOSUB 4250
- 1260 GOSUB 6530
- 1270 GOSUB 7290
- 1280 GOSUB 8500
- 1290 EH = 6
- 1300 WHILE (CM < AC)
- 1310 BL = EV
- 1320 BW = CJ
- 1330 WHILE ((BL <= BZ) AND (CM < AC))
- 1340 IF DN = FJ THEN GOSUB 2050
- 1360 IF (EA = FJ AND DM = FJ) THEN GOSUB 5240
- 1370 IF (EA = FJ AND DM = FJ) THEN GOSUB 5580
- 1380 IF (EA = FJ AND DM = FJ) THEN GOSUB 5920
- 1390 IF (EA = FJ) THEN GOSUB 6110
- 1400 GOSUB 7580
- 1410 WEND
- 1420 '
- 1430 BL = BZ
- 1440 BW = AI
- 1450 WHILE ((BL >= EV) AND (CM < AC))
- 1460 IF DN = FJ THEN GOSUB 2050
- 1480 IF (EA = FJ AND DM = FJ) THEN GOSUB 5240
- 1490 IF (EA = FJ AND DM = FJ) THEN GOSUB 5580
- 1500 IF (EA = FJ AND DM = FJ) THEN GOSUB 5920
- 1510 IF (EA = FJ) THEN GOSUB 6110
- 1520 GOSUB 7580
- 1530 WEND
- 1540 WEND
- 1550 GOSUB 9580
- 1560 END
- 1570 '
- 1620 BP = FI
- 1630 AT = 3
- 1640 FOR AR = 1 TO DQ
- 1650 AV(AR) = 0
- 1660 FOR CW = 0 TO CL
- 1670 BM$(AR, CW) = " "
- 1680 EQ(AR, CW) = -1
- 1690 NEXT
- 1700 NEXT
- 1710 AD$ = CHR$(1)
- 1720 BO = 0
- 1730 DU = 1
- 1740 BV = 1
- 1750 BU = 0
- 1760 CM = 0
- 1770 DN = FJ
- 1780 DM = FJ
- 1790 BT = 200
- 1800 AU = 2
- 1810 EJ# = 0
- 1820 EM = 0
- 1830 DF = 10
- 1840 DB = 10
- 1850 DE = DO
- 1860 BE = 10
- 1870 BB = 10
- 1880 BD = DO
- 1910 RETURN
- 1920 '
- 1970 ON ERROR GOTO 10090
- 1980 KEY OFF
- 1990 SCREEN 0,0,0
- 2000 WIDTH 80
- 2010 COLOR FH, AJ, AJ
- 2011 DW = DO
- 2012 FB$ = "X"
- 2013 CC = 2 * BS
- 2020 CLS
- 2030 GOSUB 6440
- 2040 RETURN
- 2050 '
- 2100 IF BW = CJ THEN LOCATE EH, BL - 1, DP
- 2110 IF BW = AI THEN LOCATE EH, BL + CO, DP
- 2120 PRINT AM$;
- 2130 LOCATE EH, BL, DP
- 2140 PRINT CN$;
- 2150 IF BL = BJ THEN EA = FJ
- 2160 IF BW = CJ THEN BL = BL + 1
- 2170 IF BW = AI THEN BL = BL - 1
- 2180 RETURN
- 2190 '
- 2250 PLAY "MB T125 O3 L8"
- 2260 PLAY "X" + VARPTR$(CG$)
- 2290 COLOR FH, AJ, AJ
- 2300 EZ = 1
- 2310 AN = 9
- 2320 CS = 1
- 2330 EE = 80
- 2340 GOSUB 4840
- 2360 PLAY "X" + VARPTR$(CH$) + "D4P8"
- 2390 COLOR EB, AJ, AJ
- 2400 DT$ = EY$
- 2410 EH = 3
- 2420 GOSUB 3120
- 2430 COLOR FI, AJ, AJ
- 2440 DT$ = FG$
- 2450 EH = 5
- 2460 GOSUB 3220
- 2470 DT$ = BN$
- 2480 EH = 6
- 2490 GOSUB 3120
- 2500 EH = 7
- 2510 LOCATE EH, (40 - (LEN(EC$))/2), DP
- 2520 PRINT EC$;
- 2540 PLAY "X" + VARPTR$(CG$)
- 2570 COLOR FH, AJ, AJ
- 2580 EZ = 10
- 2590 AN = 23
- 2600 CS = 3
- 2610 EE = 77
- 2620 GOSUB 4840
- 2640 PLAY "X" + VARPTR$(CH$) + "D2"
- 2670 COLOR BQ, AJ, AJ
- 2680 LOCATE 12, (40 - (LEN("??? WHAT IS THIS ???"))/2), DP
- 2690 PRINT "??? WHAT IS THIS ???";
- 2700 COLOR FI, AJ, AJ
- 2710 LOCATE 14, 7, DP
- 2720 PRINT " POP the problems before they fill your buckets. To POP them,";
- 2730 LOCATE 15, 7, DP
- 2740 PRINT "type in the right answer. The more you POP, the higher your score.";
- 2750 COLOR EB, AJ, AJ
- 2760 LOCATE 17, 7, DP
- 2770 PRINT CZ$(1);
- 2780 COLOR FI, AJ, AJ
- 2790 LOCATE 17, 12, DP
- 2800 PRINT "Watch for MEGGIE! If you type the answer when she appears,";
- 2810 COLOR EB, AJ, AJ
- 2820 LOCATE 18, 7, DP
- 2830 PRINT CZ$(2);
- 2840 COLOR FI, AJ, AJ
- 2850 LOCATE 18, 12, DP
- 2860 PRINT " you get BONUS points.";
- 2870 COLOR EB, AJ, AJ
- 2880 LOCATE 20, 7, DP
- 2890 PRINT AZ$(1);
- 2900 COLOR FI, AJ, AJ
- 2910 LOCATE 20, 12, DP
- 2920 PRINT "But watch OUT for BURGLAR! He'll steal points if you type";
- 2930 COLOR EB, AJ, AJ
- 2940 LOCATE 21, 7, DP
- 2950 PRINT AZ$(2);
- 2960 COLOR FI, AJ, AJ
- 2970 LOCATE 21, 12, DP
- 2980 PRINT " an answer when he's around.";
- 2990 COLOR BQ, AJ, AJ
- 3000 LOCATE 25, (40 - (LEN("Press SPACE BAR to start."))/2), DP
- 3010 PRINT "Press SPACE BAR to start.";
- 3020 COLOR BQ, AJ, AJ
- 3030 DT$ = EY$
- 3040 EH = 3
- 3050 GOSUB 3220
- 3060 COLOR FH, AJ, AJ
- 3090 PLAY "MF"
- 3100 IF INKEY$ = "" THEN 3100
- 3110 RETURN
- 3120 '
- 3170 FOR BL = 3 TO (40 - (LEN(DT$))/2)
- 3180 LOCATE EH, BL, DP
- 3190 PRINT " "; DT$;
- 3200 NEXT BL
- 3210 RETURN
- 3220 '
- 3270 FOR BL = (78 - LEN(DT$)) TO (40 - (LEN(DT$))/2) STEP -1
- 3280 LOCATE EH, BL, DP
- 3290 PRINT DT$; " ";
- 3300 NEXT BL
- 3310 RETURN
- 3320 '
- 3380 CLS
- 3400 COLOR FH, AJ, AJ
- 3410 EZ = 1
- 3420 AN = 5
- 3430 CS = 1
- 3440 EE = 80
- 3450 GOSUB 4840
- 3480 COLOR BQ, AJ, AJ
- 3490 EH = 3
- 3500 LOCATE EH, (40 - (LEN(EY$))/2), DP
- 3510 PRINT EY$;
- 3540 COLOR FH, AJ, AJ
- 3550 EZ = 6
- 3560 AN = 17
- 3570 CS = 3
- 3580 EE = 77
- 3590 GOSUB 4840
- 3620 COLOR BQ, AJ, AJ
- 3630 LOCATE 8, (40 - (LEN("--- MAKE THE GAME THE WAY YOU LIKE IT ---"))/2), DP
- 3640 PRINT "--- MAKE THE GAME THE WAY YOU LIKE IT ---";
- 3650 COLOR FI, AJ, AJ
- 3660 LOCATE 10, 17, DP
- 3670 PRINT "Press 1 to choose Problems ( )";
- 3680 LOCATE 11, 17, DP
- 3690 PRINT "Press 2 to choose Sound Effects ( )";
- 3700 LOCATE 12, 17, DP
- 3710 PRINT "Press 3 to choose Speed! ( )";
- 3720 LOCATE 14, 17, DP
- 3730 PRINT "Press ESC to Quit";
- 3740 LOCATE 15, 17, DP
- 3750 PRINT "Press SPACE BAR to Start Playing";
- 3760 GOSUB 4000
- 3790 COLOR FH, AJ, AJ
- 3800 EZ = 18
- 3810 AN = 23
- 3820 CS = 1
- 3830 EE = 80
- 3840 GOSUB 4840
- 3870 LOCATE EZ + 1, CS + 5, DP
- 3880 PRINT "CHOOSE:";
- 3910 EO$ = INKEY$
- 3920 WHILE (EO$ <> " ")
- 3930 IF EO$ = "1" THEN GOSUB 8190 : GOSUB 4000
- 3940 IF EO$ = "2" THEN GOSUB 7810 : GOSUB 4000
- 3950 IF EO$ = "3" THEN GOSUB 7990 : GOSUB 4000
- 3960 IF EO$ = CD$ THEN GOSUB 9580 : GOSUB 4000
- 3970 EO$ = INKEY$
- 3980 WEND
- 3990 RETURN 1250
- 4000 '
- 4050 COLOR BQ, AJ, AJ
- 4060 LOCATE FE, FD
- 4070 IF FB$ = "A" THEN PRINT "ADD ";
- 4080 IF FB$ = "S" THEN PRINT "SUBTRACT";
- 4090 IF FB$ = "M" THEN PRINT "MULTIPLY";
- 4100 IF FB$ = "D" THEN PRINT "DIVIDE ";
- 4110 IF FB$ = "X" THEN PRINT "MIX ";
- 4120 LOCATE DY, DX
- 4130 IF DW = FJ THEN PRINT "QUIET ";
- 4140 IF DW = DO THEN PRINT "SOUND ";
- 4150 LOCATE EU, ES
- 4160 PRINT ET$(CC/BS);
- 4170 LOCATE DL, DK + 5, DP
- 4180 PRINT SPC(40);
- 4190 LOCATE DL + 2, DK, DP
- 4200 PRINT SPC(65);
- 4210 LOCATE DL + 3, DK, DP
- 4220 PRINT SPC(65);
- 4230 COLOR FH, AJ, AJ
- 4240 RETURN
- 4250 '
- 4300 CLS
- 4330 COLOR FI, AJ, AJ
- 4340 EH = 3
- 4350 LOCATE EH, (40 - (LEN("F U N N E L S & B U C K E T S"))/2), DP
- 4360 PRINT "F U N N E L S & B U C K E T S";
- 4380 COLOR FH, AJ, AJ
- 4390 LOCATE AF, AE
- 4400 PRINT " ANSWER";
- 4410 EZ = AF + 1
- 4420 AN = EZ + 2
- 4430 CS = AE
- 4440 EE = CS + 16
- 4450 GOSUB 4840
- 4470 LOCATE EN, EK
- 4480 PRINT " SCORE";
- 4490 CS = EK
- 4500 EE = CS + 16
- 4510 GOSUB 4840
- 4520 LOCATE EN + 2, 68
- 4530 PRINT EJ#;
- 4550 COLOR FI, AJ, AJ
- 4560 EH = 5
- 4570 BL = 1
- 4580 LOCATE EH, BL
- 4590 FOR CQ = BL TO (80 - BL)
- 4600 PRINT BX$;
- 4610 NEXT
- 4620 LOCATE EH, 1
- 4630 PRINT CV$;
- 4640 LOCATE EH, 79
- 4650 PRINT EG$;
- 4670 COLOR FH, AJ, AJ
- 4680 FOR AT = 1 TO DQ
- 4690 AU = CT(AT)
- 4700 GOSUB 5100
- 4710 BJ = AU + 2
- 4720 FOR CW = 0 TO (CL - 1)
- 4730 LOCATE AO - CW, BJ, DP
- 4740 PRINT BM$(AT, CW);
- 4750 IF EQ(AT, CW) >= 0 THEN PRINT " ="; EQ(AT, CW);
- 4760 NEXT
- 4770 NEXT
- 4790 COLOR FI, AJ, AJ
- 4800 LOCATE 25, 21, DP
- 4810 PRINT "Press ESC to change choices or quit.";
- 4820 COLOR FH, AJ, AJ
- 4830 RETURN
- 4840 '
- 4890 LOCATE AN, CS, DP
- 4900 PRINT CR$;
- 4910 LOCATE EZ, CS, DP
- 4920 PRINT CU$;
- 4930 FOR DV = EZ + 1 TO AN - 1
- 4940 LOCATE DV, CS
- 4950 PRINT AQ$;
- 4960 LOCATE DV, EE
- 4970 PRINT AQ$;
- 4980 NEXT
- 4990 LOCATE AN, EE, DP
- 5000 PRINT ED$;
- 5010 LOCATE EZ, EE, DP
- 5020 PRINT EF$;
- 5030 FOR DV = CS + 1 TO EE - 1
- 5040 LOCATE EZ, DV
- 5050 PRINT AP$;
- 5060 LOCATE AN, DV
- 5070 PRINT AP$;
- 5080 NEXT
- 5090 RETURN
- 5100 '
- 5150 FOR AW = FA TO AO
- 5160 LOCATE AW, AU, DP
- 5170 PRINT AX$;
- 5180 LOCATE AW, AU + AY, DP
- 5190 PRINT AX$;
- 5200 NEXT
- 5210 LOCATE AO + 1, AU, DP
- 5220 PRINT AS$;
- 5230 RETURN
- 5240 '
- 5290 IF (BD = FJ) THEN RETURN
- 5300 IF (DE = FJ) THEN GOTO 5460
- 5330 CI = INT(RND(1) * DA) + 1
- 5340 IF CI >= DA THEN DE = FJ
- 5350 IF DE = DO THEN RETURN
- 5380 DC = DC + 1
- 5390 DF = (INT(RND(1) * 11) + 7)
- 5400 DB = (INT(RND(1) * 76) + 2)
- 5410 FOR CX = 1 TO DH
- 5420 LOCATE DF + CX - 1, DB, DP
- 5430 PRINT CZ$(CX);
- 5440 NEXT CX
- 5450 IF DW = DO THEN PLAY "X" + VARPTR$(DI$)
- 5460 '
- 5480 DC = DC + 1
- 5490 WHILE ((DC >= DJ) OR (EA = DO))
- 5500 FOR CX = 0 TO (DH - 1)
- 5510 LOCATE DF + CX, DB, DP
- 5520 PRINT " ";
- 5530 NEXT CX
- 5540 DC = 0
- 5550 DE = DO
- 5560 WEND
- 5570 RETURN
- 5580 '
- 5630 IF (DE = FJ) THEN RETURN
- 5640 IF (BD = FJ) THEN GOTO 5800
- 5670 CI = INT(RND(1) * BA) + 1
- 5680 IF CI >= BA THEN BD = FJ
- 5690 IF BD = DO THEN RETURN
- 5720 BC = BC + 1
- 5730 BE = (INT(RND(1) * 11) + 7)
- 5740 BB = (INT(RND(1) * 79) + 1)
- 5750 FOR CX = 1 TO BF
- 5760 LOCATE BE + CX - 1, BB, DP
- 5770 PRINT AZ$(CX);
- 5780 NEXT CX
- 5790 IF DW = DO THEN PLAY "X" + VARPTR$(BG$)
- 5800 '
- 5820 BC = BC + 1
- 5830 WHILE ((BC >= BH) OR (EA = DO))
- 5840 FOR CX = 0 TO (BF - 1)
- 5850 LOCATE BE + CX, BB, DP
- 5860 PRINT " ";
- 5870 NEXT CX
- 5880 BC = 0
- 5890 BD = DO
- 5900 WEND
- 5910 RETURN
- 5920 '
- 5970 WHILE (BK > FA - 3)
- 5980 DU = BO + 1
- 5990 GOSUB 8390
- 6000 RETURN
- 6010 WEND
- 6020 '
- 6030 IF DW = DO THEN SOUND CK, BY
- 6040 CK = CK - 50
- 6050 LOCATE BK, BJ, DP
- 6060 PRINT AK$;
- 6070 BK = BK + 1
- 6080 LOCATE BK, BJ, DP
- 6090 PRINT CA$;
- 6100 RETURN
- 6110 '
- 6160 WHILE (DM = FJ)
- 6170 CB = 0
- 6180 DM = DO
- 6190 WEND
- 6200 CB = CB + 1
- 6210 IF CB >= CC THEN DM = FJ
- 6220 RETURN
- 6350 '
- 6400 FOR BR = 1 TO BT
- 6410 GOSUB 6440
- 6420 NEXT BR
- 6430 RETURN
- 6440 '
- 6490 EW$ = MID$(TIME$,7,2)
- 6500 EX = VAL(EW$)
- 6510 RANDOMIZE EX
- 6520 RETURN
- 6530 '
- 6580 AA = INT(RND(1) * CY)
- 6590 AG = INT(RND(1) * CY)
- 6600 IF FB$ = "A" THEN GOSUB 6790
- 6610 IF FB$ = "S" THEN GOSUB 6880
- 6620 IF FB$ = "M" THEN GOSUB 6980
- 6630 IF FB$ = "D" THEN GOSUB 7070
- 6640 IF FB$ = "X" THEN GOSUB 7180
- 6650 AB$ = CHR$(AA + &H30)
- 6660 AH$ = CHR$(AG + &H30)
- 6670 IF AA >= 10 THEN AB$ = CHR$((AA\10) + &H30) + CHR$((AA MOD 10) + &H30)
- 6680 IF AG >= 10 THEN AH$ = CHR$((AG\10) + &H30) + CHR$((AG MOD 10) + &H30)
- 6690 CA$ = AB$+" "+EP$+" "+AH$+" ="
- 6700 BU = 0
- 6710 BV = 0
- 6720 CQ = 1
- 6730 WHILE ((BO\CQ) > 0)
- 6740 BV = BV + 1
- 6750 CQ = CQ * 10
- 6760 WEND
- 6770 IF BO = 0 THEN BV = 1
- 6780 RETURN
- 6790 '
- 6840 EP$ = "+"
- 6850 BO = (AA + AG)
- 6860 EL# = 5
- 6870 RETURN
- 6880 '
- 6930 EP$ = "-"
- 6940 IF AG > AA THEN SWAP AA, AG
- 6950 BO = (AA - AG)
- 6960 EL# = 10
- 6970 RETURN
- 6980 '
- 7030 EP$ = "x"
- 7040 BO = (AA * AG)
- 7050 EL# = 15
- 7060 RETURN
- 7070 '
- 7120 EP$ = CHR$(246)
- 7130 IF AG = 0 THEN AG = 1
- 7140 BO = (AA * AG)
- 7150 SWAP BO, AA
- 7160 EL# = 20
- 7170 RETURN
- 7180 '
- 7230 FF = INT(RND(1) * 4)
- 7240 IF FF = 0 THEN GOSUB 6790
- 7250 IF FF = 1 THEN GOSUB 6880
- 7260 IF FF = 2 THEN GOSUB 6980
- 7270 IF FF = 3 THEN GOSUB 7070
- 7280 RETURN
- 7290 '
- 7340 COLOR FH, AJ, AJ
- 7350 GOSUB 5100
- 7360 IF CM >= AC THEN RETURN
- 7370 BI = INT(RND(1) * (DQ - 1)/2) + 1
- 7380 IF BW = CJ THEN AT = AT + BI
- 7390 IF BW = AI THEN AT = AT - BI
- 7400 IF AT > DQ THEN AT = 1
- 7410 IF AT < 1 THEN AT = DQ
- 7420 IF AV(AT) >= CL THEN GOTO 7370
- 7430 AU = CT(AT)
- 7440 BJ = CT(AT) + 2
- 7450 GOSUB 7480
- 7460 BK = 7
- 7470 RETURN
- 7480 '
- 7530 BP = BP + 1
- 7540 IF BP > 15 THEN BP = 2
- 7550 IF BP = 8 THEN BP = 10
- 7560 COLOR BP, AJ, AJ
- 7570 RETURN
- 7580 '
- 7630 AD$ = INKEY$
- 7640 IF AD$ = "" THEN RETURN
- 7650 IF ASC(AD$) >= &H30 THEN IF ASC(AD$) <= &H39 THEN GOSUB 7680
- 7660 IF AD$ = CD$ THEN GOSUB 3320
- 7670 RETURN
- 7680 '
- 7730 DR = ASC(AD$) - &H30
- 7740 EI = 10 ^ BU
- 7750 DU = (DU * EI) + DR
- 7760 BU = BU + 1
- 7770 LOCATE 3,AE + 7
- 7780 PRINT DU;
- 7790 IF BU = BV THEN GOSUB 8390
- 7800 RETURN
- 7810 '
- 7860 COLOR BQ, AJ, AJ
- 7870 LOCATE DL, (40 - (LEN("2 - SOUND EFFECTS"))/2), DP
- 7880 PRINT "2 - SOUND EFFECTS";
- 7890 COLOR FH, AJ, AJ
- 7900 LOCATE DL + 2, DK, DP
- 7910 PRINT "1 for SOUND 2 for QUIET";
- 7920 EO$ = INKEY$
- 7930 IF EO$ = "" THEN 7920
- 7940 IF EO$ = "1" THEN DW = DO
- 7950 IF EO$ = "2" THEN DW = FJ
- 7960 GOSUB 4000
- 7970 EO$ = ""
- 7980 RETURN
- 7990 '
- 8040 COLOR BQ, AJ, AJ
- 8050 LOCATE DL, (40 - (LEN("3 - SPEED"))/2), DP
- 8060 PRINT "3 - SPEED";
- 8070 COLOR FH, AJ, AJ
- 8080 LOCATE DL + 2, DK, DP
- 8090 PRINT "1 for FASTEST 2 for FASTER 3 for FAST";
- 8100 LOCATE DL + 3, DK
- 8110 PRINT "6 for SLOWEST 5 for SLOWER 4 for SLOW";
- 8120 EO$ = INKEY$
- 8130 IF EO$ = "" THEN 8120
- 8140 IF (EO$ < "1" OR EO$ > "6") THEN RETURN
- 8150 CC = (ASC(EO$) - &H31) * BS
- 8160 GOSUB 4000
- 8170 EO$ = ""
- 8180 RETURN
- 8190 '
- 8240 COLOR BQ, AJ, AJ
- 8250 LOCATE DL, (40 - (LEN("1 - PROBLEMS"))/2), DP
- 8260 PRINT "1 - PROBLEMS";
- 8270 COLOR FH, AJ, AJ
- 8280 LOCATE DL + 2, DK, DP
- 8290 PRINT "1 for ADD 2 for SUBTRACT 3 for MULTIPLY";
- 8300 LOCATE DL + 3, DK
- 8310 PRINT "4 for DIVIDE 5 for MIX";
- 8320 EO$ = INKEY$
- 8330 IF EO$ = "" THEN 8320
- 8340 IF (EO$ < "1" OR EO$ > "5") THEN RETURN
- 8350 FB$ = FC$(ASC(EO$) - &H30)
- 8360 GOSUB 4000
- 8370 EO$ = ""
- 8380 RETURN
- 8390 '
- 8440 IF DU = BO THEN GOSUB 8760
- 8450 IF DU <> BO THEN GOSUB 8970
- 8460 GOSUB 6530
- 8470 GOSUB 7290
- 8480 GOSUB 8500
- 8490 RETURN
- 8500 '
- 8550 DU = 0
- 8560 BU = 0
- 8570 EA = DO
- 8590 FOR CX = 0 TO (DH - 1)
- 8600 LOCATE DF + CX, DB, DP
- 8610 PRINT " ";
- 8620 NEXT CX
- 8630 DC = 0
- 8640 DE = DO
- 8660 FOR CX = 0 TO (BF - 1)
- 8670 LOCATE BE + CX, BB, DP
- 8680 PRINT " ";
- 8690 NEXT CX
- 8700 BC = 0
- 8710 BD = DO
- 8720 CK = INT(RND(1) * 1500) + 2500
- 8730 DEF SEG=0: POKE 1050, PEEK(1052)
- 8740 DEF SEG: POKE 106,0
- 8750 RETURN
- 8760 '
- 8810 EJ# = EJ# + EL#
- 8820 IF DE = FJ THEN EJ# = EJ# + (EL# * 2)
- 8830 IF (DE = FJ AND DW = DO) THEN PLAY "X" + VARPTR$(DI$)
- 8840 IF (BD = FJ AND DW = DO) THEN PLAY "X" + VARPTR$(BG$)
- 8850 IF BD = FJ THEN EJ# = EJ# - (2 * EL#)
- 8860 IF EJ# < 0 THEN EJ# = 0
- 8870 LOCATE 3,68
- 8880 PRINT EJ#;
- 8890 GOSUB 9310
- 8910 WHILE (INT(EJ#/1000) > EM)
- 8920 CC = CC - BS
- 8930 IF CC < 0 THEN CC = 0
- 8940 EM = INT(EJ#/500)
- 8950 WEND
- 8960 RETURN
- 8970 '
- 9020 BT = CF
- 9030 IF DW = DO THEN SOUND 150, 10
- 9040 FOR CQ = 1 TO 3
- 9050 LOCATE AF + 2, AE + 3, DP
- 9060 PRINT CA$;BO;
- 9080 GOSUB 6350
- 9100 LOCATE AF + 2, AE + 1, DP
- 9110 PRINT AK$;
- 9130 GOSUB 6350
- 9140 NEXT
- 9150 BT = CC
- 9170 LOCATE BK, BJ, DP
- 9180 PRINT AK$;
- 9190 LOCATE AO - AV(AT), BJ, DP
- 9200 PRINT CA$; BO;
- 9210 BM$(AT, AV(AT)) = CA$
- 9220 EQ(AT, AV(AT)) = BO
- 9230 AV(AT) = AV(AT) + 1
- 9240 CM = CM + 1
- 9250 IF (BD = FJ AND DW = DO) THEN PLAY "X" + VARPTR$(BG$)
- 9260 IF BD = FJ THEN EJ# = EJ# - (2 * EL#)
- 9270 IF EJ# < 0 THEN EJ# = 0
- 9280 LOCATE 3,68
- 9290 PRINT EJ#;
- 9300 RETURN
- 9310 '
- 9360 COLOR EB, AJ, AJ
- 9370 IF DW = DO THEN SOUND 1000, 2
- 9380 CQ = 1
- 9390 FOR DZ = BK - 1 TO BK + 1
- 9400 LOCATE DZ, BJ - 1, DP
- 9410 PRINT CE$(CQ);
- 9420 CQ = CQ + 1
- 9430 NEXT
- 9450 COLOR BP, AJ, AJ
- 9460 LOCATE BK, BJ + 5, DP
- 9470 PRINT BO;
- 9490 BT = CF
- 9500 GOSUB 6350
- 9510 BT = CC
- 9530 FOR DZ = BK - 1 TO BK + 1
- 9540 LOCATE DZ, BJ - 1, DP
- 9550 PRINT AL$;
- 9560 NEXT
- 9570 RETURN
- 9580 '
- 9630 CLS
- 9640 OPEN "FUNNELS.SCR" FOR INPUT AS #1
- 9650 INPUT #1, DS$, CP#
- 9660 CLOSE #1
- 9670 LOCATE 8, 31
- 9680 PRINT "YOUR SCORE WAS "; EJ#;
- 9690 IF CP# >= EJ# THEN GOSUB 9790
- 9700 IF CP# < EJ# THEN GOSUB 9920
- 9720 LOCATE 18, 26
- 9730 PRINT "Care to play again (Y/N)?";
- 9740 AD$ = INKEY$
- 9750 IF AD$ = "Y" OR AD$ = "y" THEN GOTO 1230
- 9760 IF AD$ = "N" OR AD$ = "n" OR AD$ = CD$ THEN CLS : SYSTEM
- 9770 GOTO 9740
- 9780 RETURN
- 9790 '
- 9840 LOCATE 10, 31
- 9850 PRINT "Good job. But ...";
- 9860 LOCATE 12, (80 - LEN(DS$))/2
- 9870 PRINT DS$
- 9880 LOCATE 14, 25
- 9890 PRINT "still holds the high score of "; CP#;
- 9900 IF DW = DO THEN PLAY "X" + VARPTR$(ER$)
- 9910 RETURN
- 9920 '
- 9970 IF DW = DO THEN PLAY "X" + VARPTR$(CG$)
- 9980 LOCATE 10, 27
- 9990 PRINT "You have set a new record!"
- 10000 IF DW = DO THEN PLAY "X" + VARPTR$(CH$) + "D2"
- 10010 LOCATE 12, 21
- 10020 PRINT "What is your name, please";
- 10030 INPUT DS$
- 10040 CP# = EJ#
- 10050 OPEN "FUNNELS.SCR" FOR OUTPUT AS #1
- 10060 WRITE #1, DS$; CP#
- 10070 CLOSE #1
- 10080 RETURN
- 10090 '
- 10150 IF ERR <> 53 THEN GOTO 10220
- 10160 CLOSE #1
- 10170 OPEN "FUNNELS.SCR" FOR OUTPUT AS #1
- 10180 WRITE #1, "Nobody"
- 10190 WRITE #1, 0
- 10200 CLOSE #1
- 10210 RESUME 9630
- 10220 '
- 10230 CLS
- 10240 LOCATE 7, 29
- 10250 COLOR EB, AJ, AJ
- 10260 PRINT "--- PROBLEM "; ERR; " ---";
- 10270 COLOR FH, AJ, AJ
- 10280 LOCATE 10, 30
- 10290 PRINT "Something is wrong.";
- 10300 LOCATE 12, 27
- 10310 '
- 10320 IF ERR = 71 THEN PRINT "The disk drive is not ready."
- 10330 IF ERR = 72 THEN PRINT " The disk may be damaged."
- 10340 '
- 10350 IF (ERR = 24 OR ERR = 27) THEN PRINT "The printer is not ready."
- 10360 '
- 10370 IF ERR = 57 THEN PRINT " There is an I/O error."
- 10380 '
- 10390 PRINT " IBM error code: "; ERR
- 10400 LOCATE 22, 10
- 10410 PRINT "--- Press <Esc> to Quit or any OTHER key to Resume again. ---"
- 10420 LOCATE 23, 10
- 10430 PRINT "(It only makes sense to resume if you have corrected the problem.)"
- 10440 AD$ = INKEY$
- 10450 IF AD$ = "" THEN 10440
- 10460 IF AD$ = CD$ THEN SYSTEM
- 10470 CLS
- 10480 RESUME 1240
-