home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1994 September / 1994-09b.d64 / dogs (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  10KB  |  263 lines

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