Battle   XBattlefield by James Thurlby, from ZX Computing Apr/May 1984. dmain program n 9000(# x 7940 }a,b;t$:10 n$="8" m$= m$""1000 5m$=""m$=n$:a,b;7;t$:5:1000 2000 130  move tank &.01z# =,5:.01z# =,5 $m$"q"m$"z"m$"8"m$"7"m$=n$ ,a=a+(m$="z"a<21)-(m$="q"a>1) ,b=b+(m$="8"b<31)-(m$="7"b>1) 8t$=(""m$="q")+(""m$="z")+(""m$="8")+(""m$="7") a,b;7;t$ a1,b1;4;" " $ a1=a:b1=b .n$=m$  check safety of move s$(a,b)=" "2990 s$(a,b)=""f=15:.1}L,-20:.05|L,-20:f:0,0;1;1;0;" YOU RAN INTO A TANK-TRAP!! ":3000 :2990 s$(a,b)=""s$(a,b)=""s$(a,b)=""s$(a,b)=""s$(a,b)=""f=110 :.01z# =,-15:.05|L,-17:.01z# =,-19:f:0,0;1;1;0;" YOU DROVE INTO A CRATER!! ":3000 :2990 s$(a,b)=""f=15:.1}L,-20:.1}L,-19:.1}L,-18:f:0,0;1;1;0;" YOU HIT A LAND MINE!! ":3000 :2990 2s$(a,b)=""resstage*2m$"8"4000 s$(a,b)=""2990 Ts$(a,b)=""0,0;1;0;" MISSION SUCCESSFUL "  ,2070:f=18:c,d:c,d:f .2~L,15,.1}L,15,.3,16,.3,15,.3,17,.3,14,.2~L,13 ,.5,12  dest=dest+1:s$(a,b)=" " %>0,0;4;" " *<8200 :res=res+1:resP0,0;1;0;7;"ALL destroyed - Return to base. "  tank destroyed Vf=1400:f:0,0;4;" TANK DESTROYED " s$(a,b)=" " ?a,b;" ":a=10 :b=1:a1=a:b1=b:a,b;"":t$="" n$="8":tank=tank-1 Vf=1300,:f:0,0;4;" " 8200 tank>03140D end of game :2,2;"End of game.";5,3;"You rescued ";dest;" m";("e"(dest>1dest=0))+("a"dest=1);"n." r$=("NOVICE"dest<10 )+("CADET"dest10 dest<20)+("JUNIOR"dest20dest<30)+("SENIOR"dest30dest<502)+("CAPTAIN"dest502dest<70F)+("COMMANDER"dest70F) J10 ,0;"You have reached ";r$;'" status in this exercise." !-4035:f=144,:c,d:c,d:f &"Another game ? (y/n) ";z$ 0z$="y"120x : 9999' D stage completed okay  35,2;"Stage ";stage;" completed....." -4035:f=144,:c,d:c,d:f .15~,14,.1}L,17,.25~,19,.4L,21,0,0,0,0,0,0,0,0,.1}L,14,.2~L,17,.25~,19,.4L,21 Ń0,0,0,0,0,0,.1}L,14,.2~L,17,.25~,19,.4L,21,.25~,17,.3,14,.2~L,17,.3,16,0,0,0,0,0,0,.2~L,17,.2~L,17,.3,16,.5,14,.3,17,.2~L,21,.2~L,21,.4L,19 ư0,0,0,0,0,0,.3,17,.4L,19,.5,21,.5,17,.55 ,14,.5,16,.73333,14  8000@ n$="8"  calculate screen co-ord x=(*20)+1 y=(*30)+1   initialise tank=5 dest=0 "stage=0 @stage=stage+1 Js$(21,31) T1:4: ^f=1stage*5 h,7900:s$(x,y)="":x,y;1;"" r,7900:s$(x,y)="":x,y;2;"" |,7900:s$(x,y)="":x,y;0;"" s7900:s$(x,yy+1)="":s$(x+1,yy+1)="":x,y;0;"";x+1,y;0;"" f %f=1stage*2:7900 %s$(x,y)=""7900:8112 8x<12 x>8y<47900:8115 #s$(x,y)="":x,y;6;"":f t$="" #a=10 :b=1:a1=a:b1=b  res=0 10 ,0;"" e0,20;" ":f=1tank-1:0,20+f*2;0;"":f Ff=9 11 :f,1;" ":s$(f,13)=" ":f s$(10 ,1)="" & #(instructions #2p0:7:0::0,7;"BATTLEFIELD.";1;0,7;"____________";0 #<2,2;"The game of Battlefield makes you a tank commander whose job is to cross the landscape and destroy enemy installations." #F<'5;" The following keys control"'" the tank:-" #Pd'" ""q"" = move up"''" ""z"" = move down"''" ""8"" = move right"''" ""7"" = move left" #set up UDG characters #I9120#:b=113 :z$:f=07:a:z$+f,a:f:b #E"A",16,146,186,254,254,254,186,130,"B",130,186,254,254,254,186,146,16,"C",254,568,124|,127,124|,568,254,0,"D",127,28,62>,254,62>,28,127,0 #"E",0,0,0,16,124|,254,254,0,"F",112p,76L,66B,76L,112p,64@,64@,64@,"G",0,16,568,124|,124|,254,254,254 #"H",0,6,15,31,63?,31,31,15,"I",480,124|,254,255,254,254,254,252,"J",63?,63?,63?,31,31,7,3,0,"K",255,255,254,254,252,248,176,32 ,"L",16,124|,255,255,255,126~,28,16,"M",14,62>,126~,14,2,2,2,2 #{6'" BEWARE of landmines """" , tank-traps """" and craters """" , """"";'19;"" #"Ready to start ? ";z$ # 0 # ]