home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1986 June / 1986-06.d64 / switcheroo (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  4KB  |  93 lines

  1. 10 fora=54272to54295:pokea,0:next:poke54296,47:poke54273,16:poke54280,19
  2. 20 poke54277,24:poke54284,24:poke54295,20:poke54291,25:poke54287,5:gosub640
  3. 30 goto280
  4. 40 jy=15-(peek(56320+pl*f2)and15):fr=peek(56320+pl*f2)and16:iffr=0thenjy=0
  5. 50 return
  6. 60 wait56320+pl*f2,16,0:return
  7. 70 poke53288,c1:poke53289,c2:return
  8. 80 tx=x*6-1:ty=y*4-3:gosub270:poke646,c:print""a$:return
  9. 90 poke54276,16:poke54283,16:poke54276,17:poke54283,17
  10. 100 fora=1to300:next:poke54276,0:poke54283,0:return
  11. 110 poke54280,19:forb=50to150step50:poke54273,b:gosub90:next:return
  12. 120 poke54290,128:poke54290,129:fora=100to200:poke54294,a:next:return
  13. 130 qt=0:x=0:q=1:fora=1to5:forb=1to5:x=x+ar(a,b):next:ifx=35orx=40thengosub190
  14. 140 x=0:next:q=2:fora=1to5:forb=1to5:x=x+ar(b,a):next:ifx=35orx=40thengosub190
  15. 150 x=0:next:q=3:fora=1to5:b=a:x=x+ar(a,b):next:ifx=35orx=40thengosub190
  16. 160 x=0:q=4:fora=1to5:b=6-a:x=x+ar(a,b):next:ifx=35orx=40thengosub190
  17. 170 ifqtthen230
  18. 180 return
  19. 190 qt=1:a$="[146]  [157][157]  ":ifq=1thenforzb=1to5:x=a:y=zb:gosub80:next:return
  20. 200 ifq=2thenforzb=1to5:y=a:x=zb:gosub80:next:return
  21. 210 ifq=3thenforza=1to5:x=za:y=za:gosub80:next:return
  22. 220 forza=1to5:x=za:y=6-za:gosub80:next:return
  23. 230 poke53269,0:gosub110:ty=23:tx=4:gosub270
  24. 240 print" press fire button to play again"
  25. 250 ifpeek(56320)<>111andpeek(56321)<>239then250
  26. 260 clr:goto280
  27. 270 poke783,0:poke781,ty:poke782,tx:sys65520:return
  28. 280 print"";:dim cl(25),ar(5,5):pc(0)=7:pc(1)=8:pl=1:f2=peek(828)
  29. 290 mx(1)=0:mx(2)=0:mx(4)=-48:mx(8)=48:my(1)=-32:my(2)=32:my(4)=0:my(8)=0
  30. 300 fora=1to5:forb=1to5:ar(a,b)=14:nextb,a:oj=0
  31. 310 a$="[207][183][183][183][183][208][157][157][157][157][157][157][180]    [170][157][157][157][157][157][157][180]    [170][157][157][157][157][157][157][204][175][175][175][175][186]":b$="[145][145][145]"
  32. 320 fori=0to23:print"                                       ":m=1063+(40*i)
  33. 330 pokem,160:pokem+54272,6:next:poke2023,160:poke56295,6
  34. 340 print"                                       [154]":poke53281,1
  35. 350 forx=1to5:print""spc(5)a$b$a$b$a$b$a$b$a$:nextx:fori=1to25:cl(i)=1:next
  36. 360 poke53250,126:poke53251,228:poke53252,223:poke53253,228
  37. 370 gosub130:poke53248,173:poke53249,129:poke53269,7
  38. 380 pl=-(pl=0):poke54273,16*2^pl:poke54280,19*2^pl
  39. 390 c1=pc(pl):c2=3:gosub70:fl=1:poke53248,173:poke53249,129
  40. 400 poke53264,0:gosub40:ifjy=4thenc1=pc(pl):c2=3:fl=1:gosub70
  41. 410 ifjy=8thenc1=3:c2=pc(pl):fl=2:gosub70
  42. 420 iffr=16then400
  43. 430 gosub90:gosub60:xp=173:yp=129
  44. 440 poke53249,0:poke53264,(xpand256)/256:poke53248,xpand255:poke53249,yp
  45. 450 gosub40:t=xp+mx(jy):xp=xp-mx(jy)*(t>76andt<270):t=yp+my(jy)
  46. 460 yp=yp-my(jy)*(t>64andt<194):iffr=16then440
  47. 470 gosub90:c=pc(pl):gosub60:x=int((xp-26)/48):y=int((yp-32)/32)
  48. 480 iffl=2then510
  49. 490 ifar(x,y)<>14thengosub120:goto390
  50. 500 oj=0:ar(x,y)=c:gosub80:goto370
  51. 510 gosub60
  52. 520 gosub40:iffr=0thengosub60:goto390
  53. 530 if(jy+oj=3andx=ox)or(jy+oj=12andy=oy)thengosub120:goto390
  54. 540 onjygoto550,560,520,570,520,520,520,580:goto520
  55. 550 t=ar(x,1):fora=1to4:ar(x,a)=ar(x,a+1):next:ar(x,5)=t:goto590
  56. 560 t=ar(x,5):fora=5to2step-1:ar(x,a)=ar(x,a-1):next:ar(x,1)=t:goto590
  57. 570 t=ar(1,y):fora=1to4:ar(a,y)=ar(a+1,y):next:ar(5,y)=t:goto600
  58. 580 t=ar(5,y):fora=5to2step-1:ar(a,y)=ar(a-1,y):next:ar(1,y)=t:goto600
  59. 590 fora=1to5:y=a:c=ar(x,a):gosub80:next:gosub610:goto370
  60. 600 fora=1to5:x=a:c=ar(x,y):gosub80:next:gosub610:goto370
  61. 610 oj=jy:ox=x:oy=y:return
  62. 620 fora=14336to14527:readb:pokea,b:next:poke53276,3:poke53285,0
  63. 630 poke53287,15:fora=224to226:poke1816+a,a:next:return
  64. 640 poke53281,1:poke53280,6:print"[147]";:a$="[207][183][208][157][157][157][180] [170][157][157][157][204][175][186]":b$="[145][145]"
  65. 650 fori=0to23:print"                                       ":m=1063+(40*i)
  66. 660 pokem,160:pokem+54272,6:next:poke2023,160:poke56295,6
  67. 670 print"                                       "
  68. 680 print"[154]":fori=1to5:printspc(12);:forz=1to5:print""a$b$;:next
  69. 690 print"":next:print""spc(18)"[158]"a$"[129]";:gosub90
  70. 700 printa$;:gosub90:print"[145][145][145][145][145][145][145][145][145][145][145][158]"a$:gosub90:printspc(15)"[129]"a$;
  71. 710 gosub90:print"[157][157][157][157][157][157][158]"a$;:gosub90:print"[129]"spc(24)a$
  72. 720 gosub90:print""spc(15)"[158]"a$;:gosub90:print"[145][145][145][145][145][145][145][145][145][145][145][157][157][157][157][157][157][129]"a$;
  73. 730 gosub90:printspc(6)"[158]"a$:gosub90:tx=25:ty=6:gosub270:fori=1to5
  74. 740 print" [157][157][157][157]";:next:gosub110:print""spc(10)"s w i t c h e r o o"
  75. 750 gosub620:ty=21:tx=16:gosub270:print"1 or [146]2[157][157][157][157][157][157][157]joysticks"
  76. 760 getmt$:ifmt$<>"1"andmt$<>"2"then760
  77. 770 poke828,val(mt$)-1:return
  78. 780 data 0,0,0,0,0,0,0,0,0,0,168,0,2,170,64,10,170
  79. 790 data 144,10,170,144,42,170,164,42,170,164,42
  80. 800 data 170,164,42,170,164,42,170,164,10,170,144
  81. 810 data 10,170,144,2,170,64,0,168,0,0,0,0,0,0,0
  82. 820 data 0,0,0,0,0,0,0,0,0,0,170,170,160,170,170
  83. 830 data 164,170,170,164,170,170,164,170,170,164
  84. 840 data 170,170,164,170,170,164,170,170,164,170
  85. 850 data 170,164,170,170,164,170,170,164,170,170
  86. 860 data 164,170,170,164,170,170,164,170,170,164
  87. 870 data 170,170,164,170,170,164,170,170,164,170
  88. 880 data 170,164,21,85,84,0,0,0,0,0,32,0,0,112,0
  89. 890 data 0,248,0,1,252,0,0,112,0,0,112,0,0,112,0
  90. 900 data 16,0,64,48,0,96,126,3,240,254,3,248,126
  91. 910 data 3,240,48,0,96,16,0,64,0,112,0,0,112,0,0
  92. 920 data 112,0,1,252,0,0,248,0,0,112,0,0,32,0,0
  93.