1 rem ~~~artillery~~~ 2 rem jeff jessee and 3 rem creative computing 5 rem 6 gosub 10000 10 dima(100),b(100),h(39),a1(2),b1(2),a2(2),b2(2),l(2) 15 print"{clr}" 20 print"{home}directions?";:get d$:x=rnd(2):if d$="n"then38 21 if d$<>"y"then 20 30 print"{clr}"," artillery":poke59468,14 :rem sets lower case mode 31 print:print"tHIS IS{$a0}A{$a0}GAME{$a0}IN{$a0}WHICH{$a0}2{$a0}PLAYERS{$a0}SHOOT{$a0}"; 32 print"AT{$a0}EACH{$a0}OTHER{$a0}ACROSS{$a0}A{$a0}MOUNTAIN." 33 print:print"aT{$a0}EACH{$a0}TURN, THE{$a0}PLAYER{$a0}ENTERS{$a0}THE " 34 print"ANGLE{$a0}TO{$a0}FIRE (0-90) AND{$a0}THE{$a0}NUMBER{$a0}OF {$a0}BAGS{$a0}OF "; 35 print"POWDER (5 to 10 BAGS),HITTING return "; 36 print"AFTER{$a0}EACH.":print:print:print"hIT{$a0}ANY{$a0}KEY{$a0}TO{$a0}BEGIN." 37 get g$:if g$="" then 37 38 print"{clr}":poke 59468,12:rem reset to graphics 50 z$="{rvon} {up}{left}":for x=1 to 5:z$=z$+z$:nextx 60 a$="{rght}":for x=1 to 6:a$=a$+a$:nextx:b$="{down}":for x=1 to 5:b$=b$+b$:nextx 80 n=2 90 rem 130 x1=int(6+rnd(1)*8) 140 x2=int(25+rnd(1)*8) 150 l(1)=int(3+(x1-3)*rnd(1)) 160 l(2)=int(x2+1+(36-x2)*rnd(1)) 170 h9=rnd(1)*11+1 180 for i=1 to x1:h(i)=h9:nexti 210 h9=rnd(1)*11+1 220 for i=x2 to 39:h(i)=h9:nexti 250 if abs(h(1)-h(39))<4 then 170 260 x3=x1+int(rnd(1)*(x2-x1-6))+3 270 h(x3)=rnd(1)*11+9 290 d1=(h(x3)-h(1))/2 300 d2=(h(x3)-h(39))/2 310 if d1*d2<=0 then 470 320 j=-180 330 k=180/(x3-x1+1) 340 h9=h(1)+d1 350 for i=x1+1 to x3-1 360 j=j+k 370 h(i)=h9+cos(j*~/180)*d1 380 nexti 390 j=0 400 k=180/(x2-x3+1) 410 h9=h(39)+d2 420 for i=x3+1 to x2-1 430 j=j+k 440 h(i)=h9+cos(j*~/180)*d2 450 nexti 460 goto 550 470 d=(h(1)-h(39))/2 480 j=0 490 k=180/(x2-x1+1) 500 h9=h(39)+d 510 for i=x1+1 to x2-1 520 j=j+k 530 h(i)=h9+cos(j*~/180)*d 540 next i 550 print"{clr}"; 560 w=int(100*(rnd(1)-.5)) 570 printleft$(b$,22); 580 for i=1 to 39:h(i)=int(h(i)+.5):nexti 590 for x=1 to 39:ifx=1 then610 600 print"{rght}"; 610 printmid$(z$,1,h(x)*4); 650 for z=1 to h(x):print"{down}";:nextz 660 next x:print"{rvof}" 670 print"{home}"; 680 printmid$(b$,1,22-h(1));:if l(1)=1 then 700 690 printmid$(a$,1,l(1)-1); 700 print"~"; 710 print"{home}"; 720 printmid$(b$,1,22-h(39)); 730 printmid$(a$,1,l(2)-1); 740 print"~";:get g$:get g$ 750 print"{home}"; 760 printmid$(b$,1,24); 770 print" "; 780 k=1 790 ifw>=0 then 820 800 print-w;" mph wind to left "; 810 goto 840 820 printw;" mph wind to right "; 830 print"{home}"; 840 print"{home}";:n=3-n:if n=1 then 900 850 printleft$(a$,33); 860 input e:print"{home}"; 870 printleft$(b$,1);left$(a$,33); 880 input v:if v>15 then v=15 890 goto 910 900 print "{home}";" " 902 print" ";"{home}"; 905 input e:print"{home}{down}";:input v:if v>15 then v=15 910 k=k+1:if e=0 then 90 930 a2(n)=a2(n)-2.86 940 e=90-e 950 if n=1 then 970 960 e=-e 970 x1=l(n) 980 y1=h(l(n))+1 990 t=0:m=0 1010 v1=sin(e*~/180)*v 1020 v2=cos(e*~/180)*v*.7 1030 t=t+.5:m=m+1 1040 v1=v1+(v1+w*.5)/1500 1050 x=x1+(v1+w*.5/50)*t 1060 x=int(x+.5) 1070 y=y1+(v2-t/3)*t 1080 y=int(y+.5) 1090 z=23-y:print"{home}"; 1092 a(m)=z:b(m)=x:if x>39 or x<1 then 1350 1094 ify-h(x)<=0 then 1340 1100 if z<0 then 1150 1110 if z=0 then 1125 1120 printleft$(b$,z); 1125 if x=1 then 1140 1130 printleft$(a$,x-1); 1140 print"Q" 1150 print"{home}"; 1160 if m-4<1 then 1030 1162 if a(m-4)=0 then 1180 1164 if a(m-4)<0 or b(m-4)<=0 then 1030 1170 printleft$(b$,a(m-4)); 1180 printleft$(a$,b(m-4)-1); 1190 print" "; 1200 print"{home}"; 1220 goto 1030 1230 if m=1 then 1030 1232 if b(m)<1 or b(m)>39 then 840 1233 rem lines 1234 and 1260 determine hit. change '1.5' to change difficulty. 1234 if abs(b(m-1)-l(n))<1.5 then 1250 1240 goto 1260 1250 if t>1 then 1510 1260 if abs(b(m-1)-l(3-n))<1.5 then1560 1270 if t<1 then 1030 1280 goto 1460 1290 print"{home}" 1300 print"another game ? yes or no " 1310 input g$ 1320 if g$ <>"no" then 90 1330 end 1340 print"{home}"; 1350 for j=4 to 1 step -1 1360 if m-j<=0 then 1440 1370 if a(m-j)=0 then 1405 1380 if a(m-j)<0 or b(m-j)<=0 then 1440 1400 print left$(b$,a(m-j)); 1405 if b(m-j)=1 then 1420 1410 printleft$(a$,b(m-j)-1); 1420 print" "; 1430 print"{home}"; 1440 next j:if m=1 then 1600 1450 if b(m)<1 or b(m)>39 then 1610 1455 goto 1230 1460 if b(m-1)=1 then 1470 1465 printleft$(a$,b(m-1)-1); 1470 printleft$(b$,23-h(b(m-1))); 1472 for z=1 to 3: print"{up}{left}|W/{up}{left}{left}{left}|!/";:for x=1 to 5:nextx 1474 print"{left}{left}{left}{down} {up}{left}{left}{left} {left}{left}{down}{down}";:for x=1 to 5:next x:next z:print"{CBM-O}"; 1480 goto 1600 1510 print"{home}"; 1520 printleft$(a$,l(n)-1); 1530 printleft$(b$,24-h(l(n))); 1540 for z=1 to10:print"{up}{left}{rvon}_Q{SHIFT-POUND}{rvof}{up}{left}{left}{left}{left}|{CBM-B}!{rvon}{CBM-B}{rvof}/{left}{left}{left}{left}{left}{up}|M!N/{left}{left}{down}{down}";"{left}"; 1544 print" {left}{left}{left}{up} {left}{left}{left}{left}{left}{up} {left}{left}{left}{up}{down}{down}{down}{down}"; 1545 for x=1 to 2:next x:next z 1546 forx=1 to50:next x 1550 goto 1290 1560 print"{home}"; 1570 printleft$(a$,l(3-n)-1); 1580 printleft$(b$,24-h(l(3-n)-1)); 1590 goto 1540 1600 rem 1610 w=w+int(10*(rnd(1)-.5)) 1620 print"{home}";left$(b$,24);" "; 1630 if w>=0 then print" {left}{left}{left}";w;" mph wind to right ";:goto 840 1640 print" {left}{left}{left}";-w;" mph wind to left ";:goto 840 9999 end 10000 rem 10010 print "{clr}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}";tab(15);"{rvon}artillery":print:print 10020 print tab(11);"creative computing" 10030 print tab(13);"p.o. box 789-m" 10040 print tab(6);"morristown, new jersey 07960" 10050 for b1=1 to 2000:next b1 10060 b1=0 10070 print "{clr}"; 10080 return