home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disk User Volume 1 #3 / Commodore_Disk_User_Vol.1_3_1988_-.d64 / balls (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  1KB  |  46 lines

  1. 100 poke53280,0:poke53281,0:print"[159][147]";
  2. 110 s=1024:dq=55296-s
  3. 120 pokes+dq,6:pokes,96:pokes+dq+39,6:pokes+39,96
  4. 130 pokes+dq+960,6:pokes+960,96:pokes+dq+999,6:pokes+999,96
  5. 140 fori=s+1tos+38:pokei+dq,6:pokei,100:next
  6. 150 fori=s+79tos+959step40:pokei+dq,6:pokei,101:next
  7. 160 fori=s+961tos+998:pokei+dq,6:pokei,99:next
  8. 170 fori=s+40tos+920step40:pokei+dq,6:pokei,103:next
  9. 190 deffnr(x)=int(peek(56324)*x/256)
  10. 200 dimx(20),y(20),xd(20),yd(20)
  11. 210 n=6
  12. 220 fori=1ton
  13. 230 x(i)=fnr(30)+5
  14. 240 y(i)=fnr(20)+2
  15. 241 ifpeek(s+x(i)+y(i)*40)<>32then230
  16. 250 xd(i)=fnr(3)-1
  17. 260 yd(i)=fnr(3)-1
  18. 261 ifxd(i)=0andyd(i)=0then260
  19. 270 next
  20. 300 nn=1
  21. 310 c=0
  22. 500 fori=1tonn
  23. 510 xx=x(i):yy=y(i)
  24. 520 x=xx+xd(i):y=yy+yd(i)
  25. 530 p=peek(s+x+40*y)
  26. 540 ifp=32then600
  27. 545 ifxd(i)andyd(i)andp=102then580
  28. 550 ifp=102thenj=xd(i):xd(i)=yd(i):yd(i)=-j:x=x+xd(i):y=y+yd(i):goto530
  29. 560 ifp=100orp=99thenyd(i)=-yd(i):goto520
  30. 565 ifp=103orp=101thenxd(i)=-xd(i):goto520
  31. 570 ifp=96thenxd(i)=-xd(i):yd(i)=-yd(i):goto520
  32. 580 xd(i)=fnr(3)-1
  33. 585 yd(i)=fnr(3)-1
  34. 587 ifxd(i)=0andyd(i)=0then580
  35. 590 goto520
  36. 600 pokes+xx+yy*40,32
  37. 610 pokes+x+y*40,81
  38. 615 x(i)=x:y(i)=y
  39. 620 nexti
  40. 621 c=c+1
  41. 622 ifc<100then630
  42. 623 c=0:nn=nn+1:ifnn>nthennn=n
  43. 624 p=s+164+fnr(32)+40*fnr(18)
  44. 626 ifpeek(p)=32thenpokep,160:pokep+dq,fnr(15)+1
  45. 630 goto500
  46.