mirror of
https://github.com/rfivet/BCG101.git
synced 2024-12-18 08:06:27 -05:00
227 lines
5.6 KiB
QBasic
227 lines
5.6 KiB
QBasic
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
|