home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
SIMTEL
/
CPMUG
/
CPMUG021.ARK
/
HORSE.ASC
< prev
next >
Wrap
Text File
|
1984-04-29
|
5KB
|
236 lines
1 PRINT"HORSE RACE":Q2=5
2 PRINT "ANY NUMBER OF PLAYERS CAN BET ON THE RESULTS."
3 PRINT "EXAMPLE OF BET; 1,2,200,0 ."
4 PRINT"YOU BORROWED 5$ IN CASE YOU LOST ALOT.":PRINT
5 PRINT" SEVENTH - 1 MILE, 3 YR. OLDS POST 2:35"
6 PRINT
7 PRINT"1 MAN O' WAR (3:1); 2 CITATION (4:1);";
8 PRINT" 3 WHIRLAWAY (5:1);"
9 PRINT"4 ASSAULT (8:1); 5 SEABISCUIT (9:1);";
10 PRINT" 6 GALLANT FOX(11:1);"
11 PRINT"7 STYMIE (20:1); 8 COALTOWN (30:1);"
12 PRINT
13 PRINT"ENTER HORSE(1-8);TO WIN,PLACE,SHOW(1,2,3);AND THE WAGER."
14 PRINT "AND 0 FOR NO MORE BETTING OR 1 OR MORE BETTING."
15 LET S = 0
16 PRINT
17 LET S = S + 1
18 PRINT"BET NO. ";S;
19 INPUT T(S),U(S),V(S),Y1
20 LET T(S)=ABS(INT(T(S)))
21 IF T(S)>8 THEN 26
22 IF T(S)<1 THEN 26
23 LET U(S)=ABS(INT(U(S)))
24 IF U(S)>3 THEN 26
25 IF U(S)>0 THEN 29
26 PRINT"HORSE NO. OR WIN-PLACE-SHOW BET IN ERROR"
27 LET R = 3*(J-1)
28 INPUT V(S)
29 IF V(S) -2=ABS(V(S)-2) THEN 32
30 PRINT"BET MUST BE >$2 AND <$300, BET AGAIN";
31 GOTO 28
32 IF V(S)>300 THEN 30
33 IF Y1 = 1 THEN 17
34 PRINT
35 PRINT" THEY'RE OFF AND RUNNING -"
36 PRINT
37 LET M(1) = 62.25
38 M(2) = 60
39 M(3) = 350/6
40 M(4) = 500/9
41 M(5) = 55
42 M(6) = 650/12
43 M(7) = 1100/21
44 M(8) = 1600/31
45 LET O(1) = 6
46 O(2) = 8
47 O(3) = 10
48 O(4) = 16
49 O(5) = 18
50 O(6) = 22
51 O(7) = 40
52 O(8) = 60
53 FOR N = 1 TO 8
54 LET H(N)=0
55 NEXT N
56 LET K = 0
57 LET G=1
58 LET J = 1
59 LET N = 4*T(1)-U(1)
60 FOR Z5=S TO 5*V(S)+N
61 LET Z1=RND(1)
62 NEXT Z5
63 FOR Z5=1 TO 500000
64 IF INT(Z5/N)-G<>0 THEN 82
65 LET H(J)=H(J)+RND(1)*M(J)
66 LET J=J+1
67 LET G=G+1
68 IF J <> 9 THEN 81
69 LET J = 1
70 GOSUB 134
71 LET D = H(B(1))
72 LET K=K+1
73 PRINT
74 IF K = 8 THEN 78
75 GOSUB 194
76 GOSUB 159
77 GOTO 82
78 PRINT" FINISH"
79 LET Z5=500001
80 GOSUB 159
81 LET Z1=RND(1)
82 NEXT Z5
83 PRINT
84 PRINT
85 PRINT"$2 MUTUELS PAID:"
86 PRINT" STRAIGHT PLACE SHOW"
87 LET K = 0
88 FOR I = 1 TO 3
89 GOSUB 165
90 LET J=I
91 IF J = 1 THEN 95
92 PRINT" ";
93 LET J=J-1
94 GOTO 91
95 FOR J = I TO 3
96 LET L=I+I+J
97 IF J > 1 THEN 100
98 LET R = 1
99 GOTO 101
100 LET R = 3*(J-1)
101 LET H(L)=1.5+.01*INT((O(B(I))/R+RND(1))*100)
102 PRINT H(L);
103 NEXT J
104 PRINT
105 NEXT I
106 PRINT
107 LET Q=0
108 FOR J=1 TO S
109 PRINT "BET NO. ";J
110 LET P=0
111 FOR I = 1 TO 3
112 IF B(I) <> T(J) THEN 119
113 IF U(J) < I THEN 125
114 LET P = .01*INT((V(J)*50)*H(I+I+U(J)))
115 PRINT "YOU COLLECT";P;"ON ";
116 GOSUB 165
117 PRINT
118 GOTO 127
119 NEXT I
120 LET I = T(J)
121 PRINT"TEAR UP YOUR TICKET ON ";
122 FOR I = 4 TO 8
123 IF B(I) = T(J) THEN 116
124 NEXT I
125 PRINT"NEXT TIME, PURCHASE A SHOW TICKET ON ";
126 GOTO 116
127 LET Q = Q+P-V(J)
128 NEXT J
129 GOTO 7000
130 PRINT"YOUR TOTAL WINNINGS AMOUNT TO $";Q2
131 GOTO 300
132 PRINT"YOUR TOTAL LOSSES AMOUNT TO $";ABS(Q2)
133 GOTO 300
134 LET Q = 1
135 FOR L1 = 1 TO 8
136 LET B(L1) = 1
137 LET A(L1) = 1
138 NEXT L1
139 FOR L1 = 1 TO 8
140 FOR L2 = 1 TO 8
141 IF L1=L2 THEN 145
142 IF H(L1)<>H(L2) THEN 145
143 PRINT"RERUN PLEASE"
144 STOP
145 IF H(L1)<H(L2) THEN 147
146 LET A(L1)=A(L1)+1
147 NEXT L2
148 LET A(L1) = A(L1) - 1
149 NEXT L1
150 FOR L1=8 TO 1 STEP -1
151 FOR L2 = 1 TO 8
152 IF A(L2)<>L1 THEN 156
153 LET B(Q) = L2
154 LET Q=Q+1
155 LET L2 = 9
156 NEXT L2
157 NEXT L1
158 RETURN
159 REM
160 IF K = 8 THEN 193
161 PRINT"POS. HORSE LENGTHS BEHIND"
162 PRINT
163 FOR I = 1 TO 8
164 PRINT I;
165 IF B(I)=1 THEN 186
166 IF B(I)=2 THEN184
167 IF B(I)=3 THEN 182
168 IF B(I)=4 THEN 180
169 IF B(I)=5 THEN 178
170 IF B(I)=6 THEN 176
171 IF B(I)=7 THEN 174
172 PRINT"COALTOWN ";
173 GOTO 187
174 PRINT"STYMIE ";
175 GOTO 187
176 PRINT"GALLANT FOX";
177 GOTO 187
178 PRINT"SEABISCUIT ";
179 GOTO 187
180 PRINT"ASSAULT ";
181 GOTO 187
182 PRINT"WHIRLAWAY ";
183 GOTO 187
184 PRINT"CITATION ";
185 GOTO 187
186 PRINT"MAN O'WAR ";
187 IF K = 0 THEN 193
188 IF I > 1 THEN 191
189 PRINT
190 GOTO 192
191 PRINT .1*INT(D-H(B(I)))
192 NEXT I
193 RETURN
194 IF K=1 THEN 204
195 IF K=2 THEN 206
196 IF K=3 THEN 208
197 IF K=4 THEN 210
198 IF K=5 THEN 212
199 IF K=6 THEN 214
200 IF K = 7 THEN 202
201 GOTO 215
202 PRINT" COMING DOWN THE STRETCH -"
203 GOTO 215
204 PRINT" AS THEY BREAK FROM THE GATE -"
205 GOTO 215
206 PRINT" AT THE 1/4 MILE POLE -"
207 GOTO 215
208 PRINT" NEARING THE HALFWAY MARK -"
209 GOTO 215
210 PRINT" MIDWAY IN THE RACE -"
211 GOTO 215
212 PRINT" AT 5/8 OF A MILE -"
213 GOTO 215
214 PRINT " ROUNDING THE TURN -"
215 RETURN
216 END
300 INPUT"DO YOU WANT TO BET ON THE NEXT RACE (Y OR N)";W$
310 IF W$="N" THEN 340
320 IF W$="Y" THEN 5
330 GOTO 300
340 IF Q2>0 THEN 380
350 IF Q2<0 THEN 390
360 PRINT"BYE NOW!!!!"
370 GOTO 216
380 PRINT"PUT THE MONEY I OWE YOU ON MY TAB!!":GOTO 216
390 PRINT"PUT THE MONEY YOU OWE ME ON THE TERMINAL!!!"
400 GOTO 216
7000 Q2=Q+Q2
7010 IF Q2=0 THEN 7300
7020 IF Q2<0 THEN 132
7030 GOTO 130
7300 PRINT"WELL YOU BROKE EVEN!"
7310 GOTO 300