1
0
mirror of https://github.com/rfivet/BCG101.git synced 2024-12-24 02:57:38 -05:00
BCG101/dec/HOCKEY.BAS
2024-06-13 10:03:58 +08:00

227 lines
5.6 KiB
QBasic

10 LET A1=INT(14*RND(X))+6)
20 LET X=1
30 REM *** CONVERTED FROM BRAND X TO DIGITAL RSTS/E BY DAVID AHL
40 PRINT " N.B. THIS PROGRAM IS DESIGNED FOR THOSE WHO KNOW NOTHING"
50 PRINT " ABOUT HOCKEY LIKE MYSELF. --- C. BUTTREY"
60 PRINT " THIS IS CORNELL U. HOCKEY."
70 PRINT " I AM CORNELL, WHO ARE YOU";
90 INPUT A$
100 PRINT
110 PRINT " YOU HAVE THREE SHOTS:"
120 PRINT " 1. SLAP SHOT."
130 PRINT " 2. FLICK SHOT."
140 PRINT " 3. WRIST SHOT."
150 PRINT
160 PRINT " HERE IS THE FACE-OFF:"
170 PRINT " SCORE:"
180 PRINT " CORNELL "A
190 PRINT " "A$" "B
200 IF X=2 THEN 240
210 IF X=3 THEN 260
220 IF A+B >= (1/3*A1) THEN 1560
230 GOTO 290
240 IF A+B >= (2/3*A1) THEN 1630
250 GOTO 290
260 IF (A+B) >= (A1) THEN 1710
270 GOTO 290
280 IF B=3 THEN 1560
290 LET C=INT(2*RND(X)+1)
300 IF C=1 THEN 330
310 PRINT " "A$" WINS THE FACE-OFF."
320 GOTO 650
330 PRINT " CORNELL TAKES THE FACE-OFF."
340 LET D=INT(3*RND(X)+1)
350 IF D=1 THEN 500
360 IF D=2 THEN 570
370 PRINT " WRIST SHOT..."
380 LET E=INT(5*RND(X)+1)
390 IF E=4 THEN 470
400 PRINT " SHOT IS MISSED."
410 LET F=INT(2*RND(X)+1)
420 IF F=1 THEN 450
430 PRINT " CORNELL REGAINS THE PUCK."
440 GOTO 340
450 PRINT " "A$" TAKES THE PUCK."
460 GOTO 650
470 PRINT " **GOOD!**"
480 LET A=A+1
490 GOTO 160
500 PRINT " SLAP SHOT..."
510 LET C1=INT(3*RND(X)+1)
520 IF C1=2 THEN 540
530 GOTO 560
540 PRINT " ICING PENALTY....."
550 GOTO 450
560 GOTO 380
570 PRINT " FLICK SHOT.."
580 LET S1=INT(3*RND(X)+1)
590 IF S1=3 THEN 610
600 GOTO 640
610 PRINT " PENALTY FOR HIGH STICKING! CORNELL MAN PUT IN BOX FOR"
620 PRINT " TWO MINUTES!"
630 GOTO 1110
640 GOTO 380
650 PRINT " YOUR SHOT";
660 INPUT G
670 IF G=1 THEN 720
680 IF G=2 THEN 900
690 IF G=3 THEN 970
700 PRINT " INPUT EITHER '1' '2' OR '3'"
710 GOTO 650
720 PRINT " SLAP SHOT."
730 LET Z1=INT(3*RND(X)+1)
740 IF Z1=2 THEN 760
750 GOTO 780
760 PRINT " ICING PENALTY....."
770 GOTO 1090
780 LET H=INT(5*RND(X)+1)
790 IF H=1 THEN 870
800 PRINT " SHOT IS WIDE."
810 LET I=INT(2*RND(X)+1)
820 IF I=1 THEN 850
830 PRINT " CORNELL TAKES THE PUCK."
840 GOTO 990
850 PRINT " "A$" REGAINS THE PUCK."
860 GOTO 650
870 PRINT " **GOOD!**"
880 LET B=B+1
890 GOTO 160
900 PRINT " FLICK SHOT...."
910 LET B1=INT(3*RND(X)+1)
920 IF B1=1 THEN 940
930 GOTO 960
940 PRINT " ICING PENALTY....."
950 GOTO 830
960 GOTO 780
970 PRINT " WRIST SHOT.."
980 GOTO 780
990 PRINT " CORNELL SHOT:"
1000 LET J=INT(3*RND(X)+1)
1010 IF J=1 THEN 1160
1020 IF J=2 THEN 1210
1030 PRINT " SLAP SHOT."
1040 LET K=INT(5*RND(X)+1)
1050 IF K=1 THEN 1130
1060 PRINT " SHOT HITS THE POST."
1070 LET L=INT(2*RND(X)+1)
1080 IF L=1 THEN 1110
1090 PRINT " CORNELL REGAINS THE PUCK."
1100 GOTO 990
1110 PRINT " "A$" REGAINS THE PUCK."
1120 GOTO 1310
1130 PRINT " **GOOD!**"
1140 LET A=A+1
1150 GOTO 160
1160 PRINT " WRIST SHOT"
1170 LET M=INT(5*RND(X)+1)
1180 IF M=5 THEN 1130
1190 PRINT " SHOT IS HIGH."
1200 GOTO 1070
1210 PRINT " FLICK SHOT"
1220 LET T1=INT(3*RND(X)+1)
1230 IF T1=1 THEN 1250
1240 GOTO 1270
1250 PRINT " ICING PENALTY....."
1260 GOTO 450
1270 LET N=INT(5*RND(X)+1)
1280 IF N=1 THEN 1130
1290 PRINT " SHOT IS BLOCKED BY THE GOALIE."
1300 GOTO 1070
1310 PRINT " YOUR SHOT";
1320 INPUT O
1330 IF O=1 THEN 1430
1340 IF O=2 THEN 1540
1350 PRINT " WRIST SHOT."
1360 LET P=INT(5*RND(X)+1)
1370 IF P=2 THEN 870
1380 PRINT " SHOT IS BARELY WIDE..."
1390 LET Q=INT(3*RND(X)+1)
1400 IF Q=1 THEN 830
1410 PRINT " "A$" REGAINS THE PUCK."
1420 GOTO 650
1430 PRINT " SLAP SHOT"
1440 LET D1=INT(3*RND(X)+1)
1450 IF D1=3 THEN 1470
1460 GOTO 1500
1470 PRINT " PENALTY FOR HIGH STICKING! "A$" MAN PUT IN PENALTY"
1480 PRINT " BOX FOR TWO MINUTES"
1490 GOTO 830
1500 LET R=INT(5*RND(X)+1)
1510 IF R=1 THEN 870
1520 PRINT " SHOT IS TAKEN BY THE CORNELL GOALIE."
1530 GOTO 830
1540 PRINT " FLICK SHOT"
1550 GOTO 1500
1560 PRINT " ***** END OF FIRST PERIOD *****"
1570 LET X=2
1580 PRINT " SCORE:"
1590 PRINT " CORNELL "A
1600 PRINT " "A$" "B
1610 PRINT START OF SECOND PERIOD."
1620 GOTO 160
1630 PRINT " ***** END OF SECOND PERIOD *****"
1640 LET X=3
1650 PRINT " SCORE:"
1660 PRINT " CORNELL "A
1670 PRINT " "A$" "B
1680 PRINT ""
1690 PRINT " START OF THIRD PERIOD."
1700 GOTO 160
1710 PRINT " ***** END OF GAME *****"
1720 IF A=B THEN 1770
1730 PRINT " FINAL SCORE:"
1740 PRINT " CORNELL "A
1750 PRINT " "A$" "B
1760 STOP
1770 PRINT " SINCE SCORE IS TIED, WE WILL HAVE TO GO"
1780 PRINT " INTO SUDDEN-DEATH!"
1790 PRINT " HERE IS THE FACE-OFF."
1800 PRINT " SCORE:"
1810 PRINT " CORNELL "A
1820 PRINT " "A$" "B
1830 LET S=INT(2*RND(X)+1)
1840 IF S=1 THEN 1870
1850 PRINT " "A$" WINS THE FACE-OFF."
1860 GOTO 2080
1870 PRINT " CORNELL WINS THE FACE-OFF."
1880 LET T=INT(3*RND(X)+1)
1890 IF T=1 THEN 2040
1900 IF T=2 THEN 2060
1910 PRINT " WRIST SHOT."
1920 LET U=INT(5*RND(X)+1)
1930 IF U=1 THEN 1990
1970 PRINT " "A$" TAKES THE PUCK."
1980 GOTO 2080
1990 PRINT " CORNELL REGAINS THE PUCK."
2000 GOTO 1880
2010 PRINT " **GOOD!**"
2020 LET A=A+1
2030 GOTO 2260
2040 PRINT " SLAP SHOT"
2050 GOTO 1920
2060 PRINT " FLICK SHOT."
2070 GOTO 1920
2080 PRINT " YOUR SHOT";
2090 INPUT W
2100 IF W=1 THEN 2220
2110 IF W=2 THEN 2240
2120 PRINT "WRIST SHOT."
2130 LET Y=INT(5*RND(X)+1)
2140 IF Y=4 THEN 2190
2150 PRINT " SHOT IS MISSED."
2160 LET Z=INT(2*RND(X)+1)
2170 IF Z=1 THEN 1990
2180 GOTO 1970
2190 PRINT " **GOOD!**"
2200 LET B=B+1
2210 GOTO 2260
2220 PRINT " SLAP SHOT."
2230 GOTO 2130
2240 PRINT " FLICK SHOT."
2250 GOTO 2130
2260 PRINT " GAME IS OVER!!"
2270 PRINT " FINAL SCORE:"
2280 PRINT " CORNELL "A
2290 PRINT " "A$" "B
2300 END