home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1994 September
/
1994-09b.d64
/
dogs
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
10KB
|
263 lines
10 rem copyright 1994 - compute publications intl ltd - all rights reserved
40 :
50 : rem*** j.j.hromadik ***
60 : rem*** ventura, ca 93003 ***
80 :
110 : rem*** 110 names ***
120 hs=110:dimh$(hs),cw(hs),sr$(24),od(21),d(21),od$(21),d$(21)
130 poke53280,0:poke53281,0:print"[158]"
140 fori=1to8:readwx$(i):wz$(i)=" "+wx$(i)+" ":wy$(i)="[158]"+wz$(i):next
145 fori=1to3:readn$(i):next
148 j=1:fori=1to3:nr$(i)="7:"+n$(j):j=j+1:next
150 j=1:fori=4to6:nr$(i)="8:"+n$(j):j=j+1:next
152 j=1:fori=7to9:nr$(i)="9:"+n$(j):j=j+1:next:nr$(10)="1o:oo p.m.
158 pl$(1)[178]"first......":pl$(2)[178]"second.....":pl$(3)[178]"third......"
160 [129]i[178]1[164]3:py$(i)[178]"sys"[170]pl$(i):[130]
170 qh$(1)[178]"cont(NULL)":qh$(2)[178]"open(NULL)":qh$(3)[178]"(NULL)"
180 qh$(4)[178]"sys(NULL)":qh$(5)[178]"list(NULL)":qh$(6)[178]"clr(NULL)"
190 qh$(7)[178]"for(NULL)":qh$(8)[178]"(NULL)":qh$(9)[178]"print(NULL)"
195 fh$(1)[178]" win":fh$(2)[178]"place":fh$(3)[178]"show"
200 px$(1)[178]"player 1":px$(2)[178]"player 2":px$(3)[178]"player 3":[141]3000
205 [129]i[178]1[164]25:bk$[178]bk$[170]" ":[130]
210 [141]2220:[129]i[178]1[164]3:po(i)[178]1000:[130]
220 sr$(0)[178]"":[129]i[178]1[164]24:sr$(i)[178]sr$(i[171]1)[170]"":[130]
230 sp$[178]sr$(4):sq$[178]sr$(14):sv$[178]sr$(15)
240 er$[178]"":[129]i[178]1[164]39:er$[178]er$[170]" ":[130]
250 em$[178][200](er$,13):bb$[178]""[170][200](er$,27)
260 [153][199](147):[141]490
270 [129]i[178]1[164]hs:[135]h$(i):cw(i)[178]0:[130]
280 [129]i[178]1[164]7:[135]od$(i):od(i)[178][197](od$(i))[173]2:od$(i)[178]od$(i)[170]"-2":[130]
290 [129]i[178]8[164]21:[135]od$(i):od(i)[178][197](od$(i)):od$(i)[178]od$(i)[170]"-1":[130]
300 [129]n[178]1[164]10:fl[178][181](13[172][187](1)[170]20)
310 [153]""[163]11)n;[163]28)20[172]fl"yards"
320 hy[178][181](3[172][187](1)[170]7):[129]i[178]1[164]hy
330 j[178][181](110[172][187](1)[170]1):[139]cw(j)[178]1[167]330
340 a$(i)[178]h$(j):y$(i)[178]"sys"[170]a$(i):cw(j)[178]1:[130]
350 [153]sp$:[129]i[178]1[164]hy:[153]""[163]5)[200](a$(i),1);
352 [129]j[178]2[164][195](a$(i)):[153][202](a$(i),j,1);
354 [129]t[178]1[164]60:[130]:[130]:[153]:[130]
360 [141]840:[141]890:[141]2060
370 [141]2020:[143]*** msg brd ***
380 [129]t[178]1[164]2000:[130]:[141]470:[143]*** erase msg brd ***
390 [141]930:[143]*** bet routine ***
400 [141]1760:[143]*** race routine ***
410 [141]430:[141]440
420 [130]n:[137]2400
430 [153]sp$:[129]p[178]1[164]9:[153][163]5)" ";[163]20)" ":[130]:[142]
440 [153]sq$:[129]i[178]1[164]9:[153]er$:[130]:[142]
450 [129]t[178]1[164]500:[130]:[141]1990
460 [161]g$:[139]g$[178]""[167]460
470 [153]sp$:[129]i[178]1[164]3:[153][163]25)em$:[130]:[142]
480 [153]"":[129]i[178]1[164]9:[153]er$:[130]:[142]
490 [143]*** card posting ***
500 [153]"sys race no.";[163]19)"distance:"
510 [153]" orlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlen=lenlenlenlen=lenlenlenlenlenlenlenlenlenlenlenlenlen^"
520 [153]" peek entry waitpeekoddswaitpeek (NULL) message (NULL) waitpeek"
530 [153]" -len=lenlenlenlenlenlenlenlenlenlenlenlenlenlen(NULL)lenlenlenlen(NULL)lenlenlenlenlenlenlenlenlenlenlenlenlen<"
540 [153]" peek1peek"[163]19)"peek peek"[163]38)"peek"
550 [153]" peek2peek"[163]19)"peek peek"[163]38)"peek"
560 [153]" peek3peek"[163]19)"peek peek"[163]38)"peek"
570 [153]" peek4peek"[163]19)"peekcloseclosecloseclose-lenlenlenlenlenlenlenlenlenlenlenlenlen<"
580 [153]" peek5peek"[163]19)"peek peek"[163]38)"peek"
590 [153]" peek6peek"[163]19)"peek -lenlenlenlenlenlenlenlenlenlenlenlenlen<
600 print" [194]7[194]"tab(19)"[194] [194]first...... [158][194]"
610 print" [194]8[194]"tab(19)"[194] [194]second..... [158][194]"
620 print" [194]9[194]"tab(19)"[194] [194]third...... [158][194]"
630 print" [173][195][177][195][195][195][195][195][195][195][195][195][195][195][195][195][195][177][195][195][195][195][177][195][195][195][195][195][195][195][195][195][195][195][195][195][189]":return
635 data 10,20,30,40,50,60,70,80,oo p.m.,2o p.m.,4o p.m.
640 data fair haired,gone today,miss kernal,dam site,annie hall,silken boy
650 data high beam,outside gal,end it all,shoo fly pie,blue caress,two wheeler
660 data cross over,temper cheer,round about,abc-dee,gold rush,two by four
670 data tom's handle,careful lee,first to go,king bee,ken's wish,sun dancer
680 data way to go,mister ed,whistler,speed demon,steal away,blue bonnet
690 data hi jacks,surrender,cat-o-nine,super sammy,nuts-n-bolts,fountain
700 data got-my-goal,burn-em-up,cunningly,glory bee,well enough,silver toy
710 data never to date,lazee blue,dual purpose,elementary,too old now
720 data buttercup,need-to-know,dis-co-tech,lovingly,medicine man,miss liberty
730 data sir prize,now or never,beta girl,goldie rocks,first-in-line
740 data outsider,best for you,candy man,entry way,hey burner,super duper
750 data quick set,while away,ten-to-two,who nose,jo-jo girl,irish green
760 data kiss-n-tell,bye bye birdie,sink stopper,steal again,mickey emerald
770 data pool shark,big jake,al'ask'-a-bee,nelly oop,june bride,video queen
780 data zip lock,cal-q-later,fone me babe,lite beers,will-o-wisp,p-nutty
790 datacan o' beans,poke 'n peek,pray for me,october mae,six pack,who can tell
800 data lucky me,flashlite,coffee up,chatty daddy,jack'n jill,any ole monday
810 data foxy lady,par king,in minor key,no vacancy,her majesty,mystic way
820 data pension plan,fringe on top,miss'b'haven,snorkelin'sam,gut buster
830 data 3,5,7,9,11,13,15,2,3,4,5,6,7,8,9,10,12,14,15,18,20
840 rem*** est odds ***
850 d9=0:forj=1tohy:i=int(21*rnd(1)+1)
860 d(j)=od(i):d9=d9+d(j):d$(j)=od$(i):next
870 ifd9<6*hyord9>7*hythen850
880 return
890 rem*** print odds ***
900 printsp$:forj=1tohy:d2$=d$(j)
910 tb=21:iflen(d2$)=4thentb=20
920 printtab(tb)d2$:fort=1to90:next:next:return
930 rem*** betting routine ***
940 forc=1to3:forv=1to3:gosub2080:printsp$:m=1:printtab(5)y$(m)
950 getg$:ifg$=""then950
960 ifg$="c"thengosub1280:goto1230
970 ifg$<>chr$(13)then1010
980 printsr$(m+4)""tab(5)a$(m)
990 printsv$" selection is "a$(m)tab(33)"no."m
1000 dg$(c,v)=a$(m):dn(c,v)=m:goto1030
1010 print"[145]"tab(5)a$(m):m=m+1:ifm>hythen940
1020 printtab(5)y$(m):goto950
1030 printsp$"":m=1:printtab(25)py$(m)
1040 getg$:ifg$=""then1040
1050 ifg$<>chr$(13)then1080
1060 printsr$(m+10)""tab(25)pl$(m)
1070 printsv$""tab(18)pl$(m)tab(36)m:p(c,v)=m:goto1100
1080 print"[145]"tab(25)pl$(m):m=m+1:ifm>3then1030
1090 printtab(25)py$(m):goto1040
1100 rem
1110 printsv$+"";:fori=1to8:print""wz$(i);:next
1120 printsv$+"":m=1:printtab(4)wy$(m);
1130 getg$:ifg$=""then1130
1140 ifg$<>chr$(13)then1160
1150 wg=val(wx$(m)):goto1180
1160 print"[157][157][157][157]"tab(4)wz$(m);:m=m+1:ifm>8then1120
1170 printtab(4)wy$(m);:goto1130
1180 printsv$"[146] amount of wager is .............$"wg:w(c,v)=wg
1190 po(c)=po(c)-wg
1195 printtab(10)"any key to go on."
1200 getg$:ifg$=""then1200
1210 printsq$:fori=1to5:printer$:next
1220 print""sp$+""tab(5)a$(1):nextv
1225 rem*** print computer selections *
1230 t1=7:t2=t1+15:t3=t1+22
1235 print"[158]"sr$(14):fori=1to9:printtab(t1-1)f$(i):next
1240 printsr$(16)tab(t1)px$(c)
1245 print""sr$(19):forj=1to3
1250 printtab(t1)dg$(c,j);tab(t2+2)p(c,j);tab(t3)w(c,j):next
1255 printsr$(16)tab(t3-1)int(po(c)):gosub450
1260 rem getg$:ifg$=""then2685
1270 printsq$:fori=1to9:printer$:next:nextc:return
1280 print""sr$(4+m)tab(5)a$(m)
1290 forj=vto3:mr=int(rnd(0)*hy+1):dg$(c,j)=a$(mr):dn(c,j)=mr
1300 mr=int(rnd(0)*3+1):p(c,j)=mr
1310 mr=int(rnd(0)*8+1)*10:w(c,j)=mr:po(c)=po(c)-mr
1320 next:return
1330 forc=1to3:forv=1to3:cm(c,v)=0
1340 gosub1350:po(c)=po(c)+cm(c,v):next:next:goto1390
1350 ifdn(c,v)=wn(1)thencm(c,v)=w(c,v)*c1(p(c,v))/20:return
1360 ifdn(c,v)=wn(2)andp(c,v)>1thencm(c,v)=w(c,v)*c2(p(c,v))/20:return
1370 ifdn(c,v)=wn(3)andp(c,v)=3thencm(c,v)=w(c,v)*c3/20
1380 return
1390 rem*** payoff summary ***
1392 forc=1to3:print"";:forz=1to11:printtab(8)bb$:next
1395 print""tab(8)"" px$(c)" ....summary "
1400 printtab(9)"bet dog finish $ payoff"
1410 printtab(9)"[195][195][195][160][195][195][195][160][195][195][195][195][195][195][160][195][195][195][160][195][195][195][195][195][195]"
1420 for