home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1985 January / 1985-01.d64 / vt (.txt) < prev   
Commodore BASIC  |  2022-09-20  |  2KB  |  56 lines

  1. 100 poke52,28:poke56,28:clr:poke36878,15:gosub270:gosub480
  2. 110 s1=0:s2=0:gosub430:ifflthen100
  3. 120 print"[147]":c=30720
  4. 130 r=r+1:ifs1>=100or(s2>=100andnp=2)or(r=11andnp=1)then540
  5. 140 fora=7724to7745:pokea,160:pokea+c,0:pokea+440,160:pokea+440+c,0:next
  6. 150 fora=7746to8142step22:pokea,160:pokea+c,0:pokea+21,160:pokea+21+c,0:next
  7. 160 ifb$="y"thengosub510
  8. 170 ifnp=2thenprint"red"s1"[146]       blue"s2
  9. 180 ifnp=1thenprint"score"s2""spc(12)"round"r
  10. 190 poke251,225:poke252,30:poke253,235:poke254,30:poke837,7:poke838,d1
  11. 200 ti$="000000":sys7168:sc=int(ti/60):ifnp=1thensc=sc*lv
  12. 210 onpeek(834)goto220,230
  13. 220 sp=peek(870)+256*peek(871):gosub240:s2=s2+sc:goto120
  14. 230 sp=peek(872)+256*peek(873):gosub240:s1=s1+sc:goto120
  15. 240 poke36877,130:fora=1to6
  16. 250 pokesp,peek(sp)-2*(peek(sp)and128)+128:forb=1to400:next:poke36878,6-a:next
  17. 260 poke36877,0:poke36878,15:return
  18. 270 rem option routine
  19. 280 poke36879,25:print"[147]"tab(7)"trap 'em":poke198,0
  20. 290 print""tab(5)"1[146] one player":print""tab(5)"2[146] two player"
  21. 300 printspc(5)"3[146] quit"
  22. 310 geta$:ifa$<"1"ora$>"3"then310
  23. 320 ifa$="3"thenprint"[147]":end
  24. 330 np=val(a$):poke836,np
  25. 340 d1=11:poke843,0:ifnp=2then380
  26. 350 print" j[146]oystick or k[146]eyboard"
  27. 360 geta$:ifa$="j"thenpoke843,1:d1=7:return
  28. 370 ifa$<>"k"then360
  29. 380 print"[147]which key to go up":wait198,1:a(1)=peek(197):poke198,0
  30. 390 print"which key to go down":wait198,1:a(2)=peek(197):poke198,0
  31. 400 print"which key to go left":wait198,1:a(3)=peek(197):poke198,0
  32. 410 print"which key to go right":wait198,1:a(4)=peek(197):poke198,0
  33. 420 fora=1to4:poke829+a,a(a):next:return
  34. 430 print"[147]   enter speed (0-9)"
  35. 440 print"  or (c) for options"
  36. 450 geta$:if(a$<"0"ora$>"9")anda$<>"c"then450
  37. 460 ifa$="c"thenfl=1
  38. 470 lv=val(a$):p=60-lv*6:poke839,p:poke840,p:lv=lv+1:return
  39. 480 print"[147]do you want barriers?"
  40. 490 getb$:ifb$<>"y"andb$<>"n"then490
  41. 500 return
  42. 510 fora=1to15
  43. 520 q=rnd(1)*430+7746:ifpeek(q)<>32or(q>7899andq<7922)then520
  44. 530 pokeq,160:pokeq+c,0:next:return
  45. 540 ifnp=2then580
  46. 550 print"[147]"spc(7)"score:"s2
  47. 560 ifs2>hithenhi=s2
  48. 570 printspc(8)"high:"hi:goto620
  49. 580 w=-(s1>=100)-2*(s2>=100):print"[147]"spc(5)"player"w"wins!"
  50. 590 print"sc  :"s1:printspc(12)"[145]sc  :"s2
  51. 600 wi(w)=wi(w)+1:print"wins:"wi(1):printspc(12)"[145]wins:"wi(2)
  52. 610 t1=t1+s1:t2=t2+s2:print"tot :"t1:printspc(12)"[145]tot :"t2
  53. 620 printspc(6)"hit any key":poke198,0
  54. 630 geta$:ifa$=""then630
  55. 640 onnpgoto100,110
  56.