1
0
mirror of https://github.com/rfivet/BCG101.git synced 2024-12-18 16:16:32 -05:00

Add HOCKEY.

This commit is contained in:
Renaud 2024-06-13 10:03:58 +08:00
parent 61a5a8c0c1
commit 5da06d7017
2 changed files with 452 additions and 0 deletions

226
dec/HOCKEY.BAS Normal file
View File

@ -0,0 +1,226 @@
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

226
port/HOCKEY.BAS Normal file
View File

@ -0,0 +1,226 @@
1 RANDOMIZE\LET A1=INT(14*RND(X)+6)
2 LET X=1
3 REM *** CONVERTED FROM BRAND X TO DIGITAL RSTS/E BY DAVID AHL
4 PRINT " N.B. THIS PROGRAM IS DESIGNED FOR THOSE WHO KNOW NOTHING"
5 PRINT " ABOUT HOCKEY LIKE MYSELF. --- C. BUTTREY"
6 PRINT " THIS IS CORNELL U. HOCKEY."
7 PRINT " I AM CORNELL, WHO ARE YOU";
9 INPUT A$
10 PRINT
11 PRINT " YOU HAVE THREE SHOTS:"
12 PRINT " 1. SLAP SHOT."
13 PRINT " 2. FLICK SHOT."
14 PRINT " 3. WRIST SHOT."
15 PRINT
16 PRINT " HERE IS THE FACE-OFF:"
17 PRINT " SCORE:"
18 PRINT " CORNELL "A
19 PRINT " "A$" "B
20 IF X=2 THEN 24
21 IF X=3 THEN 26
22 IF A+B >= (1/3*A1) THEN 156
23 GOTO 29
24 IF A+B >= (2/3*A1) THEN 163
25 GOTO 29
26 IF (A+B) >= (A1) THEN 171
27 GOTO 29
28 IF B=3 THEN 156
29 LET C=INT(2*RND(X)+1)
30 IF C=1 THEN 33
31 PRINT " "A$" WINS THE FACE-OFF."
32 GOTO 65
33 PRINT " CORNELL TAKES THE FACE-OFF."
34 LET D=INT(3*RND(X)+1)
35 IF D=1 THEN 50
36 IF D=2 THEN 57
37 PRINT " WRIST SHOT..."
38 LET E=INT(5*RND(X)+1)
39 IF E=4 THEN 47
40 PRINT " SHOT IS MISSED."
41 LET F=INT(2*RND(X)+1)
42 IF F=1 THEN 45
43 PRINT " CORNELL REGAINS THE PUCK."
44 GOTO 34
45 PRINT " "A$" TAKES THE PUCK."
46 GOTO 65
47 PRINT " **GOOD!**"
48 LET A=A+1
49 GOTO 16
50 PRINT " SLAP SHOT..."
51 LET C1=INT(3*RND(X)+1)
52 IF C1=2 THEN 54
53 GOTO 56
54 PRINT " ICING PENALTY....."
55 GOTO 45
56 GOTO 38
57 PRINT " FLICK SHOT.."
58 LET S1=INT(3*RND(X)+1)
59 IF S1=3 THEN 61
60 GOTO 64
61 PRINT " PENALTY FOR HIGH STICKING! CORNELL MAN PUT IN BOX FOR"
62 PRINT " TWO MINUTES!"
63 GOTO 111
64 GOTO 38
65 PRINT " YOUR SHOT";
66 INPUT G
67 IF G=1 THEN 72
68 IF G=2 THEN 90
69 IF G=3 THEN 97
70 PRINT " INPUT EITHER '1' '2' OR '3'"
71 GOTO 65
72 PRINT " SLAP SHOT."
73 LET Z1=INT(3*RND(X)+1)
74 IF Z1=2 THEN 76
75 GOTO 78
76 PRINT " ICING PENALTY....."
77 GOTO 109
78 LET H=INT(5*RND(X)+1)
79 IF H=1 THEN 87
80 PRINT " SHOT IS WIDE."
81 LET I=INT(2*RND(X)+1)
82 IF I=1 THEN 85
83 PRINT " CORNELL TAKES THE PUCK."
84 GOTO 99
85 PRINT " "A$" REGAINS THE PUCK."
86 GOTO 65
87 PRINT " **GOOD!**"
88 LET B=B+1
89 GOTO 16
90 PRINT " FLICK SHOT...."
91 LET B1=INT(3*RND(X)+1)
92 IF B1=1 THEN 94
93 GOTO 96
94 PRINT " ICING PENALTY....."
95 GOTO 83
96 GOTO 78
97 PRINT " WRIST SHOT.."
98 GOTO 78
99 PRINT " CORNELL SHOT:"
100 LET J=INT(3*RND(X)+1)
101 IF J=1 THEN 116
102 IF J=2 THEN 121
103 PRINT " SLAP SHOT."
104 LET K=INT(5*RND(X)+1)
105 IF K=1 THEN 113
106 PRINT " SHOT HITS THE POST."
107 LET L=INT(2*RND(X)+1)
108 IF L=1 THEN 111
109 PRINT " CORNELL REGAINS THE PUCK."
110 GOTO 99
111 PRINT " "A$" REGAINS THE PUCK."
112 GOTO 131
113 PRINT " **GOOD!**"
114 LET A=A+1
115 GOTO 16
116 PRINT " WRIST SHOT"
117 LET M=INT(5*RND(X)+1)
118 IF M=5 THEN 113
119 PRINT " SHOT IS HIGH."
120 GOTO 107
121 PRINT " FLICK SHOT"
122 LET T1=INT(3*RND(X)+1)
123 IF T1=1 THEN 125
124 GOTO 127
125 PRINT " ICING PENALTY....."
126 GOTO 45
127 LET N=INT(5*RND(X)+1)
128 IF N=1 THEN 113
129 PRINT " SHOT IS BLOCKED BY THE GOALIE."
130 GOTO 107
131 PRINT " YOUR SHOT";
132 INPUT O
133 IF O=1 THEN 143
134 IF O=2 THEN 154
135 PRINT " WRIST SHOT."
136 LET P=INT(5*RND(X)+1)
137 IF P=2 THEN 87
138 PRINT " SHOT IS BARELY WIDE..."
139 LET Q=INT(3*RND(X)+1)
140 IF Q=1 THEN 83
141 PRINT " "A$" REGAINS THE PUCK."
142 GOTO 65
143 PRINT " SLAP SHOT"
144 LET D1=INT(3*RND(X)+1)
145 IF D1=3 THEN 147
146 GOTO 150
147 PRINT " PENALTY FOR HIGH STICKING! "A$" MAN PUT IN PENALTY"
148 PRINT " BOX FOR TWO MINUTES"
149 GOTO 83
150 LET R=INT(5*RND(X)+1)
151 IF R=1 THEN 87
152 PRINT " SHOT IS TAKEN BY THE CORNELL GOALIE."
153 GOTO 83
154 PRINT " FLICK SHOT"
155 GOTO 150
156 PRINT " ***** END OF FIRST PERIOD *****"
157 LET X=2
158 PRINT " SCORE:"
159 PRINT " CORNELL "A
160 PRINT " "A$" "B
161 PRINT " START OF SECOND PERIOD."
162 GOTO 16
163 PRINT " ***** END OF SECOND PERIOD *****"
164 LET X=3
165 PRINT " SCORE:"
166 PRINT " CORNELL "A
167 PRINT " "A$" "B
168 PRINT ""
169 PRINT " START OF THIRD PERIOD."
170 GOTO 16
171 PRINT " ***** END OF GAME *****"
172 IF A=B THEN 177
173 PRINT " FINAL SCORE:"
174 PRINT " CORNELL "A
175 PRINT " "A$" "B
176 STOP
177 PRINT " SINCE SCORE IS TIED, WE WILL HAVE TO GO"
178 PRINT " INTO SUDDEN-DEATH!"
179 PRINT " HERE IS THE FACE-OFF."
180 PRINT " SCORE:"
181 PRINT " CORNELL "A
182 PRINT " "A$" "B
183 LET S=INT(2*RND(X)+1)
184 IF S=1 THEN 187
185 PRINT " "A$" WINS THE FACE-OFF."
186 GOTO 208
187 PRINT " CORNELL WINS THE FACE-OFF."
188 LET T=INT(3*RND(X)+1)
189 IF T=1 THEN 204
190 IF T=2 THEN 206
191 PRINT " WRIST SHOT."
192 LET U=INT(5*RND(X)+1)
193 IF U=1 THEN 199
197 PRINT " "A$" TAKES THE PUCK."
198 GOTO 208
199 PRINT " CORNELL REGAINS THE PUCK."
200 GOTO 188
201 PRINT " **GOOD!**"
202 LET A=A+1
203 GOTO 226
204 PRINT " SLAP SHOT"
205 GOTO 192
206 PRINT " FLICK SHOT."
207 GOTO 192
208 PRINT " YOUR SHOT";
209 INPUT W
210 IF W=1 THEN 222
211 IF W=2 THEN 224
212 PRINT "WRIST SHOT."
213 LET Y=INT(5*RND(X)+1)
214 IF Y=4 THEN 219
215 PRINT " SHOT IS MISSED."
216 LET Z=INT(2*RND(X)+1)
217 IF Z=1 THEN 199
218 GOTO 197
219 PRINT " **GOOD!**"
220 LET B=B+1
221 GOTO 226
222 PRINT " SLAP SHOT."
223 GOTO 213
224 PRINT " FLICK SHOT."
225 GOTO 213
226 PRINT " GAME IS OVER!!"
227 PRINT " FINAL SCORE:"
228 PRINT " CORNELL "A
229 PRINT " "A$" "B
230 END