home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun: Game Pak / rerun-gamepak / shuffle (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  4KB  |  124 lines

  1. 5 rem 64 shuffle *** buck childress
  2. 10 rem p.o. box 2072, white city, or  97503
  3. 15 print"[147]setting up...please wait"
  4. 20 print"approximately 30 seconds"
  5. 25 poke52,48:poke56,48:clr:gosub700
  6. 30 input"[147]how many players (1-2)";np:print"[147]"
  7. 40 ifnp<>1andnp<>2then30
  8. 50 y2=56321:ifnp=2theny2=56320
  9. 60 dime(6):dimj(6):dimp(6):dimu(6):e=84:u=6:c=54272
  10. 70 so=49152:pl=1464:a=1:y1=56321:y=y1:poke53280,12
  11. 80 poke53281,3:gosub800:gt=1:gosub470:gt=0
  12. 100 rem ************ handling routine ************
  13. 110 m=0:f=0:pokepl,85:pokepl+c,u
  14. 115 geta$:fb=peek(y)and16:iffb=0andh=0thenh=1:ts=ti
  15. 120 ifa$="r"thenclr:poke198,0:goto30
  16. 125 ifh1=0theniffb=16andh=1thentf=ti:h1=1
  17. 130 r=peek(y)and8:ifr=0thengosub230
  18. 135 l=peek(y)and4:ifl=0thengosub200
  19. 140 js=peek(y)and1
  20. 145 ifjs=0andh=1andfb>0thenh=0:h1=0:d=d+1:p(d)=int((tf-ts)/6):goto160
  21. 150 goto115
  22. 160 x=x+1:pokepl,86:pokepl+c,u:ifp(d)>28thenp(d)=38-d
  23. 170 b=pl+p(d):forj=pl+1tob:m=m+1:f=f+1:pokej,e:pokej+c,u
  24. 175 ifpeek(j+1)=83orpeek(j+1)=84thengosub650:gosub300:goto100
  25. 180 forjj=1to40:next:pokej,32:next:pokej,e
  26. 185 pokej+c,u:p(d)=m-1:ifp(d)>28thengosub600
  27. 190 gosub400:goto100
  28. 200 rem ********** player movement **********
  29. 210 ifpl>1305thenpokepl,32:pl=pl-40:pokepl,85:pokepl+c,u
  30. 220 return
  31. 230 ifpl<1585thenpokepl,32:pl=pl+40:pokepl,85:pokepl+c,u
  32. 240 return
  33. 300 rem ********** puck collisions **********
  34. 305 ifpeek(j)<>peek(j+1)thent=t+1:ift>1then375
  35. 310 fori=1to6:ifj(i)=j+1then320
  36. 315 next
  37. 320 forj1=j+1tob:pokej1,e(i):pokej1+c,u(i)
  38. 325 ifpeek(j1+1)=83orpeek(j1+1)=84then345
  39. 330 forjj=1to60:next:pokej1,32:f=f+1:next:pokej1,e(i):pokej1+c,u(i)
  40. 335 p(i)=f-1:p(d)=m-2:j(i)=j1:ifp(i)>28thengosub600
  41. 340 gosub400:j1=b:j=b:i=6:return
  42. 345 ifpeek(j1)<>peek(j1+1)thent=t+1:ift>1thengosub650:pokej1+c,1:goto375
  43. 350 gosub650:p(i)=f-1:j(i)=j1
  44. 355 fori=1to6:ifj(i)=j1+1then365
  45. 360 next
  46. 365 f=f+1:forj1=j1+1tob:pokej1,e(i):pokej1+c,u(i):goto325
  47. 375 ifd<4thend=3:g=1:g1=2
  48. 380 ifd>3thend=6:g=4:g1=5
  49. 385 pokej+c,1:fori=gtog1:pokej(i)+c,1:next:gosub670:forjj=1to1250:next
  50. 390 pokej1,32:pokej,32:fori=gtog1:pokej(i),32:next
  51. 395 gosub415:j1=b:j=b:return
  52. 400 rem ********** changing sides **********
  53. 405 j(d)=j:e(d)=e:u(d)=u:ifd=3ord=6then415
  54. 410 return
  55. 415 t=0:x=0:ifd=6thengosub435:a=-a:ifa=-1thenu=6
  56. 420 ifd<>3anda=1then430
  57. 425 ifu=6thenu=2:e=83:y=y2:return
  58. 430 u=6:e=84:y=y1:return
  59. 435 forn=1to1500:next:ford=1to6:gosub450:pokej(d),32:next:d=0
  60. 440 ll=0:ifvs>=150orhs>=150thenifvs<>hsthengosub900:goto490
  61. 445 return
  62. 450 rem ********** counting the score **********
  63. 455 ifpeek(j(d))=e(d)thenifp(d)>25andp(d)=<28thensc=25
  64. 460 ifpeek(j(d))=e(d)thenifp(d)>21andp(d)=<25thensc=10
  65. 465 ifpeek(j(d))=e(d)thenifp(d)>17andp(d)=<21thensc=5
  66. 470 ife(d)=84orgt=1thenvs=vs+sc:print"";vs
  67. 475 ife(d)=83orgt=1thenhs=hs+sc:print""tab(31)hs
  68. 480 ifsc>0thensc=0:gosub500
  69. 485 return
  70. 490 geta$:ifa$<>"r"then490
  71. 495 clr:poke198,0:goto30
  72. 500 rem ********** scoring bell **********
  73. 510 ifll=1then530
  74. 520 ll=1:forn=0to24:pokec+n,0:next:pokec+24,15
  75. 530 forn=1to3:pokec+1,35:pokec+5,20:pokec+6,9
  76. 540 pokec+15,30:pokec+4,17:fornn=1to60:next
  77. 550 pokec+4,16:fornn=1to150:next:next:sysso:return
  78. 600 rem ******* sound of puck going out ********
  79. 610 forn=0to24:pokec+n,0:next:forn=1to10:pokec+1,35
  80. 620 pokec+5,20:pokec+6,9:pokec+15,30:pokec+24,n:next
  81. 630 sysso:return
  82. 650 rem ********** sound of pucks hitting each other **********
  83. 655 forn=0to24:pokec+n,0:next:pokec+1,130:pokec+5,7
  84. 660 pokec+15,30:pokec+24,15:pokec+4,21:forn=1to100:next:pokes+4,20
  85. 665 sysso:return
  86. 670 rem ********** sound when pucks disappear **********
  87. 675 forn=0to24:pokec+n,0:next:forn=1tox:pokec+1,240:pokec+5,9
  88. 680 pokec+15,130:pokec+24,15:pokec+4,21:fornn=1to200:next
  89. 685 pokec+4,20:next:sysso:return
  90. 700 rem *** custom characters and sys command (gently turn off sound) ***
  91. 710 forn=1to24:reada:next
  92. 720 poke56334,peek(56334)and254:poke1,peek(1)and251
  93. 730 forn=0to2047:poken+12288,peek(n+53248):next:poke1,peek(1)or4
  94. 740 poke56334,peek(56334)or1:poke53272,(peek(53272)and240)or12
  95. 750 forn=12952to12983:reada:poken,a:next
  96. 760 forn=49152to49170:reada:poken,a:next:restore:return
  97. 800 rem ********** playing area **********
  98. 810 w=1:forn=1264to1283:gosub890:next:forn=1664to1683:gosub890:next
  99. 820 w=7:forn=1284to1287:gosub890:next:forn=1684to1687:gosub890:next
  100. 830 w=5:forn=1288to1291:gosub890:next:forn=1688to1691:gosub890:next
  101. 840 w=0:forn=1292to1294:gosub890:next:forn=1692to1694:gosub890:next
  102. 850 w=15:forn=1295to1303:gosub890:next:forn=1695to1703:gosub890:next
  103. 855 forn=1343to1663step40:gosub890:next
  104. 860 print"[144]"tab(21)"51025out"
  105. 870 print""tab(21)"51025out"
  106. 880 return
  107. 890 poken,160:poken+c,w:return
  108. 900 rem ************ victory ************
  109. 910 ifvs>hsthenprint"";vs
  110. 920 ifhs>vsthenprint""tab(31)hs
  111. 930 forn=ctoc+24:poken,0:next:forn=1to3:pokec+5,85
  112. 940 pokec+6,85:pokec+12,85:pokec+13,85:pokec+24,15:pokec+4,33
  113. 950 pokec+11,17:forw=1to6:reada1,a2,a3,a4:pokec+1,a1:pokec,a2
  114. 960 pokec+8,a3:pokec+7,a4
  115. 970 ifa1=50thenforj=1to200:next
  116. 980 forj=1to100:next
  117. 990 next:pokec+4,32:pokec+11,16:forj=1to500:next
  118. 995 restore:sysso:next:return
  119. 1000 data25,30,18,209,33,135,25,30,42,62,31,165,50,60,37,162
  120. 1010 data42,62,31,165,50,60,37,162,0,60,126,255,255,126,60
  121. 1020 data0,0,60,126,255,255,126,60,0,16,16,248,184,184,104
  122. 1030 data40,46,64,64,224,224,240,168,164,163,169,0,133,253,169
  123. 1040 data212,133,254,160,0,152,145,253,200,192,24,208,249,96
  124.