Battle !!! "BATTLE"  4000: 4000 a b display damage status c d 9 ,20;"PLAYER 1" nV n=1 4: 9 +n,21;"UNIT ";n;" ";a(1,n,3);" ": n x 15,20;"PLAYER 2" W n=1 4: 15+n,21;"UNIT ";n;" ";a(2,n,3);" ": n H 18,0;"ENTER G for GO";19,0;"F-FIRE S-STAND"  $ clear space to display new orders  7 20,0;" " 7 21,0;" "   collect orders   p=1: 2000   cp=1 if computer plays  % cp=1 3000 :350^  p=2: 2000 ] ^ analysis and movement _ h4 8: n=1 4: p=1 2 k l tank still operational? m% a(p,n,3)=0 500 o p "STAND" order? q r" o$(p,n,1)="S" 500 y z1 transfer Line, Column & Direction to variables { |9 l=a(p,n,1):c=a(p,n,2):d=o$(p,n,2)   "FIRE" order?  " o$(p,n,1)="F" 450  1000: moving   move one square only?  " o$(p,n,3)="1" 500 % l=a(p,n,1):c=a(p,n,2)  1000: 2nd move  500   fire routine  * e=1 ̰o$(p,n,3):1100L / m$(l,c)="w" e=4:490: in wood   move shell  + z$=m$(l,c): l,c;"*":.02{# =,0   check for hit  ( l,c;"": z$="T"z$="E" 1200  e  p: n   check for win  N p=1 2: v=0: n=1 4: v=v+a(p,n,3):n / v=0 600X+(100d p=2)  p: 100d X+ 20,1;"*** Red wins. ***": , 20,1;"*** Blue wins. ***":  l,c;"": m$(l,c)=" " & 1100L: change Line and column   is move blocked?   m$(l,c)" " 1040 & a(p,n,1)=l: a(p,n,2)=c    display tank  ( a(p,n,1),a(p,n,2);p;""  t$="T": p=2 t$="E" ! " enter in array # $' m$(a(p,n,1),a(p,n,2))=t$ . L4 l=l+(d>3 d<7)-(d=8 d<3) V) c=c+(d>1 d<5)-(d>5) `  l,c; 1+(z$="E");""   which was hit?   check line and column  [ x=1 2: y=1 4:a(x,y,1)l a(x,y,2)c 1300   make tank flash  0 z=22528X+32 *l+c: z,(z+128)   damage assessment  , damage=(5-e)*(*10 )+10 ' a(x,y,3)=a(x,y,3)-damage   knock out if under 10 ' a(x,y,3)10 1290   a(x,y,1)=0:a(x,y,2)=0:a(x,y,3)=0: l,c;"": m$(l,c)=" ":y=4: x=2: 1300   turn off flash    ' .1}L,25: z,(z-128)  y: x:e=4:  get orders   n=1 4   tank still operational? & a(p,n,3)=0 2150f   make tank flash  H Z=22528X+32 *a(p,n,1)+a(p,n,2): z,z+128   collect order codes  p 19+p,n*6; p;n;:23658j\,8: 0,0; ("Player ";p;":Unit ";n;" - Move ?");a$ % a$="S" a$="F" a$="G"2070     ignore invalid inputs    2040   transfer to array  0 a$;: o$(p,n,1)=a$:a$="S" 2140\  ) 0,0;"Whichdirection? ";a$ * a$<"1" a$>"8" 2080  4 a$;: o$(p,n,2)=a$ ># 0,0;"Distance ?";a$ H a$<"1" a$>"4" 2110> R a$;: o$(p,n,3)=a$ \ z,z-128 f n:   computer gives orders  5 n=1 4: m=0: o$(2,n)=" "   tank still operational? , a(2,n,3)=0 3190v 2 l=a(2,n,1): c=a(2,n,2)   scan enemy range  h=4: 3200  m=1 3190v  # scan for enemy just out of range  h=6: 3200  m=1 3190v   main line of advance  " c=ac c=ac+1 3100  cac 3140D ? m$(l-1,c)=" " o$(2,n,2)="1": 3180l &G m$(l-1,c+1)=" " o$(2,n,2)="2": 3180l 0? m$(l,c+1)=" " o$(2,n,2)="3": 3180l :) o$(2,n,1)="S": 3190v DG m$(l-1,c-1)=" " o$(2,n,2)="8": 3180l N? m$(l,c-1)=" " o$(2,n,2)="7": 3180l X) o$(2,n,1)="S": 3190v ] b STAND if no good move g l8 o$(2,n,1)="G": o$(2,n,3)="2" v7 21,n*6; 2;n;o$(2,n): n:   scan routine  ; y=-1 1: x=-1 1: z=1 h $ x=0 y=0 3260  l1=l+z*y: c1=c+z*x L c1<1 l1<1 c1>16 l1>16 z=8: 3260   spotted a target  * m$(l1,c1)="T" 3500 : 3260   path blocked   m$(l1,c1)" " z=H z: x: y    get Direction from scan   x=1 d=3+y  x=-1 d=7-y , x=0 d=1+4*(y=1)   finish off order   q$="G": h=4 q$="F" R o$(2,n,1)=q$: o$(2,n,2)=d: o$(2,n,3)="4"   close loops  2 z=8: x=1: y=1:m=1:  = 7: 0: 7:: 0,13 ;"BATTLE" N 2,1;"Each move opens with you giving"'"each piece its orders." A "The second player (Spectrum)"'"gives his orders, the moves" + "are then played out."'"POSSIBLE MOVES:" B " GO.. FIRE.. STAND (do nothing)"'"Direction distance must be" # "given for GO or FIRE commands."  " GO 1 or 2 squares." [ "Rivers & woods can't be crossed."'"FIRE - Max. 4 squares - more damage at close range." % n=1 2: g$: graphics + r=0 7: b: g$+r,b: r: n V "A",0,0,31,24,126~,255,126~,60<: tank S "B",0,1,0,1,0,1,0,85U:grid Lines  m$(16,16): map ' o$(2,4,3): orders om$(6,3)="rrr":m$(7,4)="r":m$(10 ,13 )="r":m$(11 ,14 )="rrr"  rivers on map 2 l=(*6)+4: c=(*5)+5 7 n=L 1+3: m$(n,c c+3)="wwww": n   wood in random position  ' ac=5: c<8 ac=11   attack line misses wood  N m$(1,7 10 )="TTTT":m$(16,7 10 )="EEEE"   starting positions  \ a(2,4,3): 2 armies - 4 pieces in each - line, column and damage status  _ n=1 2: e=1 4:a(n,e,1)=1+(15 n=2):Lines  / a(n,e,2)=e+6: columns of pieces - a(n,e,3)=100d: 100% =undamaged  e: n (@ 1,0: 0,0;"ONE PLAYER OR TWO ?"; A$ 2 A$"1" A$"2" 5160( < cp=A$(1) P 5: U Z blank map _ d2 0,0; 2;" " nh n=1 16: n,0; 2;" "; 7;""; 2;" ": n : GRID x3 17,0; 2;" "  direction display ! USE KEYBOARD FOR SYMBOLS 5260  1,20;"DIRECTIONS";3,22;"8 1 2";4,23;"\|/";5,22; "7-*-3"; 6,23;"/|\";7,22;"6 5 4"   put details on map  G l=1 16: c=1 16: m$(l,c)=" " 5350  rivers 2 m$(l,c)="r" 22528X+32 *l+c,40(  woods 2 m$(l,c)="w" 22528X+32 *l+c,32  c: L  display armies % 1,7; 1;"" % 16,7; 2;""  #