ZXTape!èLaserfightÔ Ô7èÖÿ û  í1000è  í1500Ü ( ñt=1 2 í2000Ð < í2500Ä F í3000¸ P ñs=0 Z ñes=0 d í3500¬ n&ús>10 *esÆ¥<.3™™™Ëì4000  xúes>10 *sËì4500” ‚ús=0Ëì6000p Œúes=0Ëì6500d – ñt=t+1   ì502 æõ ð ò150– è#õ"LASERFIGHT IN THE OK SPACE ZONE" ü'õ'"You are the intrepid admiral of spacefleet 5, comprising 400"'"ships of two types. Your thank- less task is to destroy the"'"forces of the evil Prince Orion,arch-enemy of Justice, an a"'"pretty mean hand at space"'"tactics. The aforementioned"'"prince is in possession of a"'"similar fleet." L í9900¬& V®õ"The region of space where you finally confront him comprises 216 sectors - 6x6x6. Although all weaponry is only effective within the same sector as the ship, the detectors have a rangeof 1 sector in all directions, and all the ships in your fleet report what they have detected to you by hyper-wave, so you cantell what is going on far away. Also, type 2 ships are about"'"twice as strong and destructive as type 1s." Øõ'"Happy hunting!" â í9900¬& ìþ Ü$és(6,6,6,2) æ$ée(6,6,6,2) ð.ñs(1,1,1,1)=300, ú.ñs(1,1,1,2)=100d éf(5,3) ëf=1Ì5 ñx=º(¥*5)+2 "ñy=º(¥*5)+2 ,ñz=º(¥*5)+2 6ñf(f,1)=x @ñf(f,2)=y Jñf(f,3)=z Tñe(x,y,z,1)=60< ^ñe(x,y,z,2)=20 hóf rþ Ðû Ú*õ"Standard Day ";t;" of the"'"encounter." ä,õ"Stand by for reports from the fleet..." ëx=1Ì6  ëy=1Ì6 ëz=1Ì6  ?ús(x,y,z,1)>0Ås(x,y,z,2)>0Ëí2150f *óz 4óy >óx Hþ f,õ"Fleet detachment at (";x;",";y;",";z;")," p3õ"consisting of ";s(x,y,z,1);" type 1 ships" z2õ"and ";s(x,y,z,2);" type 2 ships reports:" „ ñte=0 Žëp=x-1Ìx+1 ˜!úp<1Åp>6Ëì2290ò ¢ëq=y-1Ìy+1 ¬!úq<1Åq>6Ëì2280è ¶ër=z-1Ìz+1 À!úr<1År>6Ëì2270Þ Ê^úe(p,q,r,1)>0Ëõ" ";e(p,q,r,1);" type 1s at (";p;",";q;",";r;")":ñte=1 Ô^úe(p,q,r,2)>0Ëõ" ";e(p,q,r,2);" type 2s at (";p;",";q;",";r;")":ñte=1 Þór èóq òóp ü7úte=0Ëõ" No enemy ships within detector range."  í9900¬& þ Ä,õ"The fleet is waiting for your orders -" Î í9900¬& Øëx=1Ì6 âëy=1Ì6 ìëz=1Ì6 ö?ús(x,y,z,1)>0Ås(x,y,z,2)>0Ëí2650Z óz óy óx þ Z-õ"In sector (";x;",";y;",";z;"), you have:" d&õ" ";s(x,y,z,1);" type 1 ships" n&õ" ";s(x,y,z,2);" type 2 ships" xõ ‚ës=1Ì2 Œ ús(x,y,z,s)=0Ëì2850" –4õ"How many type ";s;" ships do you"'"want to move?" ªîa ´úa<1Ëì2850" ¾ña=½ºa Èúa>s(x,y,z,s)Ëña=s(x,y,z,s) ÒKõ"Where do you want to move them to (enter coordinates in usual order)?" æîdx ðîdy úîdz ú½(x-dx)>1Ž(y-dy)>1Ž(z-dz)>1Ådx<1Ådy<1Ådz<1Ådx>6Ådy>6Ådz>6Ëì2850" ñs(dx,dy,dz,s)=s(dx,dy,dz,s)+a ñs(x,y,z,s)=s(x,y,z,s)-a "ós ,û 6þ ¸ëf=1Ì5 Âñx=f(f,1) Ìñy=f(f,2) Öñz=f(f,3) à&úe(x,y,z,1)=0Ëì3140D ê ñsd=0 ôëp=1Ì2 þñnx=º(¥*6+1) ñny=º(¥*6+1) ñnz=º(¥*6+1) ?úp=1Ëñsd=s(nx,ny,nz,1)+2*s(nx,ny,nz,2) &Kúp=1Æs(nx,ny,nz,1)+2*s(nx,ny,nz,2)ÇsdËñsd=-1 0óp :úsd=-1Ëí3200€ Dóf Nþ € ñdx=¼(nx-x) Š ñdy=¼(ny-y) ” ñdz=¼(nz-z) ²Fñe(x+dx,y+dy,z+dz,1)=e(x+dx,y+dy,z+dz,1)+e(x,y,z,1) ¼Fñe(x+dx,y+dy,z+dz,2)=e(x+dx,y+dy,z+dz,2)+e(x,y,z,2) Æñe(x,y,z,1)=0 Ðñe(x,y,z,2)=0 Úñf(f,1)=x+dx äñf(f,2)=y+dy îñf(f,3)=z+dz øþ ¬ëx=1Ì6 ¶ëy=1Ì6 Àëz=1Ì6 Êaús(x,y,z,1)+s(x,y,z,2)>0Æe(x,y,z,1)+e(x,y,z,2)>0Ëí3650B Ô'ñs=s+s(x,y,z,1)+s(x,y,z,2) Þ)ñes=es+e(x,y,z,1)+e(x,y,z,2) èóz òóy üóx þ Bñs1=s(x,y,z,1) Lñs2=s(x,y,z,2) Vñe1=e(x,y,z,1) `ñe2=e(x,y,z,2) j,ñsl1=º((e1/2+e2)*(1+¥/4)) t4ñsl2=º((e1/4+e2/2)*(1+¥/4)) ~,ñel1=º((s1/2+s2)*(1+¥/4)) ˆ4ñel2=º((s1/4+s2/2)*(1+¥/4)) ’úsl1>s1Ëñsl1=s1 œúsl2>s2Ëñsl2=s2 ¦úel1>e1Ëñel1=e1 °úel2>e2Ëñel2=e2 º ñs1=s1-sl1 Ä ñs2=s2-sl2 Î ñe1=e1-el1 Ø ñe2=e2-el2 âñs(x,y,z,1)=s1 ìñs(x,y,z,2)=s2 öñe(x,y,z,1)=e1 ñe(x,y,z,2)=e2  (õ"Engagement at (";x;",";y;",";z;"):"'' !õ"We lost ";sl1;" type 1 ships." (õ"We have ";s1;" left." 2!õ"We lost ";sl2;" type 2 ships." <õ"We have ";s2;" left." Fõ P(õ"The enemy lost ";el1;" type 1 ships." Zõ"They have ";e1;" left." d(õ"The enemy lost ";el2;" type 2 ships." nõ"They have ";e2;" left." x í9900¬& ‚þ  „õ"Prince Orion has announced he issurrendering. He had only ";es'"ships left, and did not want to waste his few remaining sailors." ÈNõ'"Congratulations, you have won, on Standard Day ";t;" of the"'"encounter." Ü ì7000X ”Fõ"You have only ";s;" ships left,"'"and the Prince still has ";es;"." ¨õ"Do you want to withdraw?" ²îÊa$ ¼û Æ,úa$(1)="y"Æa$(1)="Y"Ëì130‚ ÐYõ"The encounter lasted ";t'"Standard Days. Never mind, he who fights and runs away..." î ì7000X p4õ"Your forces have been wiped out by Prince Orion." „+õ"You survived for ";t;" Standard"'"Days." Ž ì7000X dQõ"You have decimated Prince"'"Orion's fleet, leaving ";s;" of"'"your own ships." xNõ"The Prince managed to survive for only ";t;" Standard Days."'"Well done!" Œ ì7000X Xõ'"Do you want to try again?" lîÊa$ v*úa$É""Ëúa$(1)="y"Åa$(1)="Y"Ë÷ € ì10000' &¬õ'"Press any key to continue" &Àú¦=""Ëì9920À& &Êû &Ôþ ®