home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpmug
/
cpmug013.ark
/
1500.ASC
< prev
next >
Wrap
Text File
|
1984-04-29
|
6KB
|
177 lines
100 REM WRITTEN BY W.A.BURTON NOV.1977
101 PRINT CHR$(26) : WIDTH 80
102 PRINT TAB(20); "*** 1500 GAME ***"
103 PRINT : PRINT : PRINT
104 INPUT " DOES ANYONE NEED INSTRUCTIONS"; A$
105 IF LEFT$(A$,1)="Y" THEN GOSUB 237
106 CLEAR : BL$=" " : GF=0
107 PRINT CHR$(26)
108 INPUT " HOW MANY PLAYERS (2 TO 7)"; P
109 PRINT CHR$(26)
110 IF P<2 OR P>7 OR P<>INT(P) THEN PRINT "WRONG !!"; : GOTO 108
111 DIM PL$(P), PS(P), DI(3), Q(P)
112 FOR X=1 TO P
113 PRINT "PLAYER #"; X; : INPUT "WHAT IS YOUR NAME "; PL$(X)
114 GOSUB 204 : A=0
115 NEXT X
116 GOSUB 215
117 '
118 '
119 '
120 REM MAIN MODULE
121 PRINT "HIT RETURN TO PLAY" : WAIT 0,1,1 : PRINT CHR$(26)
122 TF=0 : TP=0
123 GOSUB 150
124 GOSUB 154
125 GOSUB 161
126 IF Q(CO)=0 AND (TP+PS(CO))>=250 THEN Q(CO)=1 : ELSE 129
127 PRINT PL$(CO); ", YOU'RE QUALIFIED"
128 PS(CO)=PS(CO)+TP : GOTO 136
129 IF Q(CO)=1 THEN 133
130 IF Q(CO)=0 AND TF=0 THEN 123
131 IF Q(CO)=0 AND TF=1 THEN PRINT "SORRY, "; PL$(CO); ", YOU BUSTED" ELSE 135
132 PRINT : GOTO 135
133 IF TF=1 THEN PRINT TAB(15); "BUSTED" ELSE 142
134 PRINT
135 PS(CO)=PS(CO)+TP
136 CO=CO+1
137 IF CO>P THEN CO=1
138 PRINT PL$(CO); ", HIT RETURN FOR YOUR TURN"
139 WAIT 0,1,1 : PRINT CHR$(26)
140 GOSUB 195
141 GOTO 122
142 A$="TRAP"
143 INPUT " DO YOU WANT TO ROLL AGAIN "; A$ : PRINT
144 IF LEFT$(A$,1)="Y" THEN 123
145 IF LEFT$(A$,1)="N" THEN 135
146 PRINT "TRY AGAIN !!"; : GOTO 142
147 '
148 '
149 '
150 REM THIS 'ROLLS' THE DICE & CHECKS FOR 'TRIPLES'
151 FOR X=1 TO 3
152 DI(X)=INT(RND(1)*6)+1
153 NEXT
154 REM CHECK FOR 'TRIPS'
155 TR$=""
156 IF DI(1)=DI(2) AND DI(2)=DI(3) THEN TR$=" ** TRIPLE **"
157 RETURN
158 '
159 '
160 '
161 REM THIS PRINTS OUT PLAYER'S SCORE
162 PRINT PL$(CO); ", YOUR ROLL WAS";
163 PRINT BL$; DI(1); BL$; DI(2); BL$; DI(3); TR$
164 PRINT : GOSUB 171
165 PRINT TAB(15); "YOUR SCORE FOR THIS TURN "; TP
166 IF Q(CO)=0 THEN PRINT
167 RETURN
168 '
169 '
170 '
171 REM THIS COMPUTES PLAYER'S SCORE
172 IF TR$<>"" THEN 184
173 IF DI(1)=5 THEN TP=TP+50
174 IF DI(2)=5 THEN TP=TP+50
175 IF DI(3)=5 THEN TP=TP+50
176 IF DI(1)=6 THEN TP=TP+100
177 IF DI(2)=6 THEN TP=TP+100
178 IF DI(3)=6 THEN TP=TP+100
179 IF DI(1)<5 AND DI(2)<5 AND DI(3)<5 THEN TF=1 : TP=0 : RETURN
180 GOTO 188
181 '
182 '
183 '
184 REM SCORING FOR 'TRIPLES'
185 X=DI(1)*100
186 IF X<500 THEN TP=0 : TP=TP-X : GOTO 188
187 TP=TP+X
188 IF TP<50 THEN TF=1
189 EG=PS(CO)+TP
190 IF EG>=1500 THEN GF=1 : GOTO 222
191 RETURN
192 '
193 '
194 '
195 REM PRINT SCORES TO DATE
196 IF GF=0 THEN PRINT "GAME SCORE"; ELSE PRINT "FINAL SCORE";
197 FOR X=1 TO P
198 PRINT TAB(15); PL$(X); TAB(27); PS(X)
199 NEXT X : PRINT
200 RETURN
201 '
202 '
203 '
204 REM 'SEED' RANDOM NUMBER GENERATOR
205 FOR X1=1 TO LEN(PL$(X))
206 A=A+ASC(MID$(PL$(X),X1,1))
207 NEXT X1
208 A=A MOD 137
209 FOR X1=1 TO A
210 A1=RND(1) : A1=RND(-X1)
211 NEXT X1 : RETURN
212 '
213 '
214 '
215 REM THIS DECIDES WHO WILL GO FIRST
216 X=INT(RND(1)*P)+1
217 PRINT CHR$(26) : PRINT PL$(X); ", YOU WILL START THIS GAME" : PRINT : PRINT
218 CO=X : RETURN
219 '
220 '
221 '
222 REM WIN ROUTINE
223 PRINT CHR$(26)
224 PRINT TAB(22); "*** WINNER ***" : PRINT : PRINT : PRINT
225 PRINT TAB(12); PL$(CO); ", YOUR WINNING ROLL WAS ";
226 PRINT DI(1); DI(2); DI(3) : PRINT : PRINT : PRINT
227 PRINT TAB(12); PL$(CO); " WINS WITH"; PS(CO)+TP; "POINTS" : PRINT : PRINT : PRINT
228 PS(CO)=EG
229 GOSUB 195
230 A$="TRAP" : INPUT "ANOTHER GAME (Y OR N)"; A$
231 IF LEFT$(A$,1)="Y" THEN RUN 106
232 IF LEFT$(A$,1)="N" THEN PRINT CHR$(26) : RESET : END
233 PRINT "NICE TRY "; : GOTO 230
234 '
235 '
236 '
237 REM INSTRUCTIONS
238 PRINT CHR$(26)
239 PRINT TAB(20); "*** INSTRUCTIONS ***" : PRINT
240 PRINT "THREE DICE ARE ROLLED, AND ARE SCORED AS FOLLOWS:" : PRINT
241 PRINT " EACH '6' ROLLED SCORES 100 POINTS"
242 PRINT " EACH '5' ROLLED SCORES 50 POINTS" : PRINT
243 PRINT "FOR EXAMPLE: A ROLL OF '6 5 1' IS WORTH 150 POINTS - 100 POINTS"
244 PRINT "FOR THE '6' AND 50 POINTS FOR THE '5'; (NOTHING FOR THE '1')." : PRINT
245 PRINT "WHEN YOU ROLL 3 OF A KIND, THE SCORING IS AS FOLLOWS:" : PRINT
246 PRINT " THREE 1'S - 100 POINTS"
247 PRINT " THREE 2'S - 200 POINTS"
248 PRINT " THREE 3'S - 300 POINTS"
249 PRINT " THREE 4'S - 400 POINTS"
250 PRINT " THREE 5'S + 500 POINTS"
251 PRINT " THREE 6'S + 600 POINTS" : PRINT
252 PRINT "GET THE IDEA...?" : PRINT
253 PRINT "HIT RETURN MORE INSTRUCTIONS" : WAIT 0,1,1
254 PRINT CHR$(26)
255 PRINT "THE GAME CONSISTS OF THREE PHASES..." : PRINT
256 PRINT TAB(12); "PHASE 1 - WHO GOES FIRST"
257 PRINT TAB(12); "PHASE 2 - QUALIFYING (REACH 250 POINTS) PHASE"
258 PRINT TAB(12); "PHASE 3 - WHO WINS (REACHES 1500 POINTS FIRST)" : PRINT
259 PRINT "THE COMPUTER DECIDES WHO GOES FIRST, THEN THE COMPUTER WILL CONTINUE"
260 PRINT "TO ROLL FOR EACH PLAYER UNTIL THAT PLAYER REACHES 250 POINTS OR UNTIL"
261 PRINT "THAT PLAYER HAS A ROLL WITH NO '5' OR '6', AT WHICH POINT THE SCORE"
262 PRINT "FOR THAT PLAYER IS RESET TO ZERO (UNLESS TRIPLES LESS THAN FIVE ARE"
263 PRINT "THROWN - IN WHICH CASE THAT PLAYER'S SCORE MAY WELL GO BELOW ZERO)."
264 PRINT "IN THIS PHASE (2) EACH PLAYER WILL EITHER REACH (OR EXCEED) 250 OR"
265 PRINT "BE RESET TO ZERO (OR LESS). WHEN A PLAYER HAS QUALIFIED, PLAY PASSES"
266 PRINT "TO NEXT PLAYER. AFTER QUALIFYING, COMPUTER ROLLS ONCE, IF THAT ROLL"
267 PRINT "RESULTS IN SCORE LESS THAN 50, TURN WILL PASS TO NEXT PLAYER. IF THAT"
268 PRINT "PLAYER SCORES 50 (OR MORE) POINTS, THEN THAT PLAYER CAN DECIDE WHETHER"
269 PRINT "TO TAKE (AND KEEP) THE POINTS FROM THAT ROLL OR TO ROLL AGAIN IN HOPE"
270 PRINT "OF GETTING MORE POINTS. ANY ROLL OF LESS THAN 50 POINTS WILL CANCEL"
271 PRINT "ALL POINTS EARNED ON THAT TURN. FIRST PLAYER TO REACH 1500 WINS. IT"
272 PRINT "IS ONLY NECESSARY TO 'QUALIFY' ONCE IN ANY GIVEN GAME, AND SCORING"
273 PRINT "RELATED TO 'TRIPLES' IS IN EFFECT DURING ALL PHASES OF THE GAME."
274 PRINT : PRINT "HIT RETURN TO PLAY" : WAIT 0,1,1
275 RETURN