"2Z$" "^J G(8,8),C(9,2),K(3,3),N(3),Z(8,8),D(8)rT((1)2020)100:T0T:T925((1)10)::D00:E3000:E0EP10:P0P:S9200:S0:B90:K90:X$"":X0$" IS " D(D)((K(I,1)S1)2(K(I,2)S2)2) R(R)((R)7.981.01)F *** INITIALIZE ENTERPRIZE'S POSITIONnQ1R(1):Q2R(1):S1R(1):S2R(1) I 1 9:C(I,1)0:C(I,2)0: IC(3,1)1:C(2,1)1:C(4,1)1:C(4,2)1:C(5,2)1:C(6,2)1XC(1,2)1:C(2,2)1:C(6,1)1:C(7,1)1:C(8,1)1:C(8,2)1:C(9,2)12 I 1 8:D(I)0: IXA1$"NAVSRSLRSPHATORSHEDAMCOMXXX"~* *** SETUP WHAT EXISTS IN GALAXY/ *** K3= # KLINGONS B3= # STARBASES S3= # STARS4 I 1 8: J1 8:K30:Z(I,J)0:R1(1)R R1.98 K33:K9K93:980&\ R1.95 K32:K9K92:980Bf R1.80 K31:K9K91eB30: (1).96 B31:B9B91G(I,J)K3100B310 R(1):J:I: K9T9 T9K91L B90 1200~ G(Q1,Q2)200 G(Q1,Q2)G(Q1,Q2)100:K9K91 B91:G(Q1,Q2)G(Q1,Q2)10:Q1 R(1):Q2 R(1); K7K9: B91 X$"S":X0$" ARE "Y "GOOD MORNING, CAPTAIN.~ :"YOUR ORDERS ARE AS FOLLOWS:" ::" DESTROY THE";K9;"KLINGON WARSHIPS WHICH HAVE INVADED"!" THE GALAXY BEFORE THEY CAN ATTACK FEDERATION HEADQUARTERS"K!" ON STARDATE";T0T9;". THIS GIVES YOU";T9;"DAYS. THERE";X0$!" ";B9;"STARBASE";X$;" IN THE GALAXY FOR RESUPPLYING YOUR SHIP"!::"HIT ANY KEY WHEN READY TO ACCEPT COMMAND"! A$! *** HERE ANY TIME NEW QUADRANT ENTERED="(Z4Q1:Z5Q2:K30:B30:S30:G50:D4.5(1):Z(Q1,Q2)G(Q1,Q2)d"n Q11 Q18 Q21 Q28 1600" 9030:: T0T 1490""YOUR MISSION BEGINS WITH YOUR STARSHIP LOCATED"""IN THE GALACTIC QUADRANT, '";G2$;"'.": 1500#"NOW ENTERING ";G2$;" QUADRANT..."C#:K3(G(Q1,Q2).01):B3(G(Q1,Q2).1)10K3n#S3G(Q1,Q2)100K310B3: K30 1590#"COMBAT AREA CONDITION RED": S200 1590#," SHIELDS DANGEROUSLY LOW"#6 I1 3:K(I,1)0:K(I,2)0: I%$@ I1 3:K(I,3)0: I:Q$Z$Z$Z$Z$Z$Z$Z$(Z$,17)l$| *** POSITION ENTERPRIZE IN QUADRANT, THEN PLACE "K3" KLINGONS, &$ *** "B3" STARBASES, & "S3" STARS ELSEWHERE$A$"<*>":Z1S1:Z2S2: 8670: K31 1820$ I1 K3: 8590:A$"+K+":Z1R1:Z2R2.% 8670:K(I,1)R1:K(I,2)R2:K(I,3)S9(0.5(1)): I@% B31 1910s%X 8590:A$">!<":Z1R1:B4R1:Z2R2:B5R2: 8670%v I1 S3: 8590:A$" * ":Z1R1:Z2R2: 8670: I% 6430% SE10 E10 D(7)0 2060&:"** FATAL ERROR ** YOU'VE JUST STRANDED YOUR SHIP IN "U&"SPACE":"YOU HAVE INSUFFICIENT MANEUVERING ENERGY,";&" AND SHIELD CONTROL":"IS PRESENTLY INCAPABLE OF CROSS";&"-CIRCUITING TO ENGINE ROOM !!": 6220& "COMMAND";A$'  I 1 9: (A$,3)(A1$,3I2,3) 21608'\ I 2300,1980,4000,4260,4700,5530,5690,7290,6270_'p I:"ENTER ONE OF THE FOLLOWING:"{'" NAV (TO SET COURSE)'" SRS (FOR SHORT RANGE SENSOR SCAN)'" LRS (FOR LONG RANGE SENSOR SCAN)'" PHA (TO FIRE PHASERS)(" TOR (TO FIRE PHOTON TORPEDOS):(" SHE (TO RAISE OR LOWER SHIELDS)c(" DAM (FOR DAMAGE CONTROL REPORTS)(" COM (TO CALL ON LIBRARY-COMPUTER)(" XXX (TO RESIGN YOUR COMMAND)":: 1990( *** COURSE CONTROL BEGINS HERE)"COURSE (0-9)";C1: C19 C11 ) C11 C19 2350a) " LT. SULU REPORTS, 'INCORRECT COURSE DATA, SIR !": 1990). X$"8": D(1)0 X$"0.2")8 "WARP FACTOR (0-";X$;")";: W1: D(1)0 W1.2 2470)L W10 W18 2490)V W10 1990'*t " CHIEF ENGINEER SCOTT REPORTS 'THE ENGINES WON'T TAKE";D*~ " WARP ";W1;"!'": 1990* "WARP ENGINES ARE DAMAGED. MAXIMUM SPEED = WARP 0.2": 1990* N(W18.5): EN0 2590* "ENGINEERING REPORTS 'INSUFFICIENT ENERGY AVAILABLE" + " FOR MANEUVERING AT WARP";W1;"!'"<+ SNE D(7)0 1990{+ "DEFLECTOR CONTROL ROOM ACKNOWLEDGES";S;"UNITS OF ENERGY"+ " PRESENTLY DEPLOYED TO SHIELDS."+ 1990+ *** KINGONS MOVE/FIRE ON MOVING STARSHIP..., I1 K3: K(I,3)0 2700H,2 A$" ":Z1K(I,1):Z2K(I,2): 8670: 8590p,d K(I,1)Z1:K(I,2)Z2:A$"+K+": 8670, I:6000:D10:D6W1: W11 D61, I1 8: D(I)0 2880, D(I)D(I)D6: D(I).1 D(I)0 D(I).1: 2880- D(I)0 28802- UF D11 D11:"DAMAGE CONTROL REPORT: ";b- 8);:R1I: 8790:G2$;" REPAIR COMPLETED."{-@ I: (1).2 3070-^ R1 R(1): (1).6 3000-r D(R1)D(R1)((1)51):"DAMAGE CONTROL REPORT: ";- 8790:G2$;" DAMAGED":: 3070/. D(R1)D(R1)(1)31:"DAMAGE CONTROL REPORT: ";]. 8790:G2$;" STATE OF REPAIR IMPROVED":}. *** BEGIN MOVING STARSHIP. A$" ":Z1(S1):Z2(S2): 8670.& X1C(C1,1)(C(C11,1)C(C1,1))(C1(C1)):XS1:YS2/D X2C(C1,2)(C(C11,2)C(C1,2))(C1(C1)):Q4Q1:Q5Q2Z/b I1 N:S1S1X1:S2S2X2: S11 S19 S21 S29 3500/ S8(S1)24(S2)326: (Q$,S8,2)" " 3360/ S1(S1X1):S2(S2X2):"WARP ENGINES SHUT DOWN AT ";0 "SECTOR";S1;",";S2;"DUE TO BAD NAVIGATION": 33700 I:S1(S1):S2(S2)L0* A$"<*>":Z1(S1):Z2(S2): 8670: 3910:T81h0f W11 T8.1(10W1)0z TTT8: TT0T9 62200 *** SEE IF DOCKED, THEN GET COMMAND0 19800 *** EXCEEDED QUADRANT LIMITS1 X8Q1XNX1:Y8Q2YNX2:Q1(X8):Q2(Y8):S1(XQ18)D1 S2(YQ28): S10 Q1Q11:S18^1 S20 Q2Q21:S281$X50: Q11 X51:Q11:S111V Q18 X51:Q18:S181~ Q21 X51:Q21:S211 Q28 X51:Q28:S281 X50 38602"LT. UHURA REPORTS MESSAGE FROM STAR FLEET COMMAND:"^2" 'PERMISSION TO ATTEMPT CROSSING OF GALACTIC PERIMETER"2" IS HEREBY * DENIED *. SHUT DOWN YOUR ENGINES.'"2"CHIEF ENGINEER SCOTT REPORTS 'WARP ENGINES SHUT DOWN 3" AT SECTOR";S1;",";S2;"OF QUADRANT";Q1;",";Q2;"." 3  TT0T9 6220=3 8Q1Q28Q4Q5 3370U3TT1: 3910: 1320s3< *** MANEUVER ENERGY S/R3FEEN10: E0 3Z"SHIELD CONTROL SUPPLIES ENERGY TO COMPLETE THE MANEUVER."3dSSE:E0: S0 S034 *** LONG RANGE SENSOR SCAN ROUTINEP4 D(3)0 "LONG RANGE SENSORS ARE INOPERABLE": 1990~4"LONG RANGE SCAN FOR QUADRANT";Q1;",";Q24O1$"-------------------":O1$4 IQ11 Q11:N(1)1:N(2)2:N(3)3: JQ21 Q215 I0 I9 J0 J9 N(JQ22)G(I,J):Z(I,J)G(I,J)N5T J: L1 3:": ";: N(L)0 "*** ";: 4230j5r((N(L)1000),3);" ";5 L:":":O1$: I: 19905 ***PHASER CONTROL ROUTINE BEGINS HERE5 D(4)O "PHASERS INOPERATIVE": 19905 K30 4330/6"SCIENCE OFFICER REPORTS 'SENSORS SHOW NO ENEMY SHIPS"i6" IN THIS QUADRANT'": 19906 D(8)0 "COMPUTER FAILURE HAMPERS ACCURACY"6"PHASERS LOCKED ON TARGET; ";6"ENERGY AVAILABLE =";E;"UNITS"7"NUMBER OF UNITS TO FIRE";X: X0 1990'70 EX0 4360E7:EEX: D(7)0 XX(1)q7bH1(XK3): I1 3: K(I,3)0 46707H((H1 D(0))((1)2)): H.15K(I,3) 45307"SENSORS SHOW NO DAMAGE TO ENEMY AT ";K(I,1);",";K(I,2): 4670,8K(I,3)K(I,3)H:H;"UNIT HIT ON KLINGON AT SECTOR";K(I,1);",";j8K(I,2): K(I,3)0 "*** KLINGON DESTROYED ***": 45808" (SENSORS SHOW";K(I,3);"UNITS REMAINING)": 46708K3K31:K9K91:Z1K(I,1):Z2K(I,2):A$" ": 86709*K(I,3)0:G(Q1,Q2)G(Q1,Q2)100:Z(Q1,Q2)G(Q1,Q2): K90 637059> I: 6000: 1990b9R *** PHOTON TORPEDO ROUTINE BEGINS HERE9\P0 "ALL PHOTON TORPEDOES EXPENDED": 19909z D(5)0 "PHOTON TUBES ARE NOT OPERATIONAL": 1990:"PHOTON TORPEDO COURSE (1-9)";C1: C19 C11: C11 C19 4850\:"ENSIGN CHEKOV REPORTS, 'INCORRECT COURSE DATA, SIR !'"g: 1990:X1C(C1,1)(C(C11,1)C(C1,1))(C1(C1)):EE2:PP1:X2C(C1,2)(C(C11,2)C(C1,2))(C1(C1)):XS1:YS2:."TORPEDO TRACK:";8XXX1:YYX2:X3(X.5):Y3(Y.5)>;` X31 X38 Y31 Y38 5490y;" ";X3;",";Y3:A$" ":Z1X:Z2Y: 8830; Z30 4920;A$"+K+":Z1X:Z2Y: 8830: Z30 5210;"*** KLINGON DESTROYED ***":K3K31:K9K91: K90 6370%< I1 3: X3K(I,1) Y3K(I,2) 51901<< I:I3E!<":Z1X:Z2Y: 8830: Z30 4760="*** STARBASE DESTROYED ***":B3B31:B9B91/= B90 K9TT0T9 5400s="THAT DOES IT, CAPTAIN !! YOU ARE HEREBY RELIEVED OF COMMAND"="AND SENTENCED TO 99 STARDATES AT HARD LABOR ON CYGNUS 12 !!"=6270="STARFLEET COMMAND REVIEWING YOUR RECORD TO CONSIDER>""COURT-MARTIAL !!":D005>6Z1X:Z2Y:A$" ": 8670r>^G(Q1,Q2)K3100B310S3:Z(Q1,Q2)G(Q1,Q2): 6000: 1990>r"TORPEDO MISSED": 6000: 1990> *** SHIELD CONTROL ***> D(7)0 "SHIELD CONTROL INOPERABLE": 1990%?"ENERGY AVAILABLE =";ES;:"NUMBER OF UNITS TO SHIELDS";XU? X0 SX "": 1990i? XES 5630?"SHIELD CONTROL REPORTS 'THIS IS NOT THE FEDERATION TREASURY'"?"": 1990@EESX:SX:"DEFLECTOR CONTROL ROOM REPORT:"A@" 'SHIELDS NOW AT";(S);"UNITS PER YOUR COMMAND'": 1990^@0 *** DAMAGE CONTROL ***s@: D(6)0 5910@D"DAMAGE CONTROL REPORT NOT AVAILABLE": D00 1990@XD30: I 1 8: D(I)0 D3D3.1@ I: D30 1990 A:D3D3D4: D31 D3.9HA"TECHNICIANS STANDING BY TO EFFECT REPAIRS TO YOUR SHIP;"A"ESTIMATED TIME TO REPAIR:";.01(100D3);"STARDATES"A"WILL YOU AUTHORIZE REPAIRS (Y/N)";A$A A$"Y" 1990A I 1 8: D(I)0 D(I)0A I:TTD3.1.B:"DEVICE STATE OF REPAIR": R11 8`B  8790: G2$;(Z$,25(G2$));(D(R1)100).01zB> R1:: D00 5720B\ 1990Bf *** KLINGONS SHOOTING ***Bp K30 Bz D00 "STARBASE SHIELDS PROTECT THE ENTERPRISE":C I1 3: K(I,3)0 6200PCH((K(I,3) D(1))(S(1))):SSH:K(I,3)K(I,3)(3(0))CH;"UNIT HIT ON ENTERPRIZE FROM SECTOR";K(I,1);",";K(I,2)C S0 6420C" ": H20 6200C (1).6 HS.02 6200$DR1 R(1):D(R1)D(R1)HS.5(1): 8790_D"DAMAGE CONTROL REPORTS '";G2$;" DAMAGED BY THE HIT'"iD8 I:DB *** END OF GAME ***DL"IT IS STARDATE";T: 6270D`:"THE ENTERPRIZE HAS BEEN DESTROYED. THE FEDERATION ";Ej"WILL BE CONQUERED": 62206E~"THERE WERE";K9;"KLINGON BATTLE CRUISERS LEFT ATUE"THE END OF YOUR MISSION.kE:: B90 6360E"THE FEDERATION IS IN NEED OF A NEW STARSHIP COMMANDERE"FOR A SIMILAR MISSION -- IF THERE IS A VOLUNTEER,F"LET HIM STEP FORWARD AND ENTER 'AYE'";A$: A$ "AYE" 260%FgF"CONGRATULATIONS, CAPTAIN ! THE LAST KLINGON BATTLE CRUISERF"MENACING THE FEDERATION HAS BEEN DESTROYED":F"YOUR EFFICIENCY RATING IS";1000(K7(TT0))2: 6290G *** SHORT RANGE SENSOR SCAN ROUTINE ***-G"": IS11 S11: JS21 S21hG2 (I.5)1 (I.5)8 (J.5)1 (J.5)8 6540GZA$">!<":Z1I:Z2J: 8830: Z31 6580G J: I:D00: 6650GD01:C$"DOCKED":EE0:PP0H"SHIELDS DROPPED FOR DOCKING PURPOSES":S0: 6720!H K30 C$"*RED*": 6720HHC$"GREEN": EE0.1 C$"YELLOW"]H@ D(2)0 6770HJ:"*** SHORT RANGE SENSORS ARE OUT ***"::HrO1$"---------------------------------":O1$: I 1 8I J(I1)241 (I1)2422 3:" ";(Q$,J,3);: J5I I 6850,6900,6960,7020,7070,7120,7180,7240iI" STARDATE ";(T10).1: 7260I" CONDITION ";C$: 7260I0" QUADRANT ";Q1;",";Q2: 7260Il" SECTOR ";S1;",";S2: 7260*J" PHOTON TORPEDOES ";(P): 7260ZJ" TOTAL ENERGY ";(ES): 7260J " SHIELDS ";(S): 7260JH" KLINGONS LEFT ";(K9)J\ I: O1$:Jp *** LIBRARY COMPUTER ROUTINE ***Kz D(8)0 "COMPUTER DISABLED": 1990MK"COMPUTER ACTIVE AND AWAITING COMMAND";A: A0 1990~K:H81: A1 7543,7900,8070,8500,8150,7400K"FUNCTIONS AVAILABLE FROM LIBRARY-COMPUTER:"K" 0 = CUMULATIVE GALACTIC RECORDK" 1 = STATUS REPORTL" 2 = PHOTON TORPEDO DATA3L" 3 = STARBASE NAV DATA^L" 4 = DIRECTION/DISTANCE CALCULATORL" 5 = GALAXY 'REGION NAME' MAP":: 7320L *** SETUP TO CHANGE CUMULATIVE GALAXY RECORD TO GALAXY MAP *** MH80:G51:" THE GALAXY": 75506Mj *** CUMULATIVE GALACTIC RECORD ***JMw"":" ";Mx"COMPUTER RECORD OF GALAXY FOR QUADRANT";Q1;",";Q2MzM~" 1 2 3 4 5 6 7 8"NO1$" ----- ----- ----- ----- ----- ----- ----- -----"&NO1$: I1 8:I;: H80 7740XN J1 8:" ";: Z(I,J)0 " ";: 7720rN((Z(I,J)1000),3);N( J: 7850N<Z4I:Z51: 9030:J0(15.5(G2$)):J0);G2$;NxZ55: 9030:J0(39.5(G2$)):J0);G2$;N:O1$: I:: 1990O *** STATUS REPORT ***EO" STATUS REPORT:":X$"": K91 X$"S"dO"KLINGON";X$;" LEFT: ";K9O"MISSION MUST BE COMPLETED IN";.1((T0T9T)10);"STARDATES"O"X$"S": B92 X$"": B91 8010P,"THE FEDERATION IS MAINTAINING";B9;"STARBASE";X$;" IN THE GALAXY""P6 5690SPJ"YOUR STUPIDITY HAS LEFT YOU ON YOUR OWN INPT"THE GALAXY -- YOU HAVE NO STARBASES LEFT !": 5690P| *** TORPEDO, BASE NAV, D/D CALCULATOR ***P K30 4270PX$"": K31 X$"S"Q"FROM ENTERPRIZE TO KLINGON BATTLE CRUISER";X$EQH80: I 1 3: K(I,3)0 8480\QW1K(I,1):XK(I,2)rQC1S1:AS2: 8220Q"DIRECTION/DISTANCE CALCULATOR:Q"YOU ARE AT QUADRANT ";Q1;",";Q2;" SECTOR ";S1;",";S2 R"PLEASE ENTER":" INITIAL COORDINATES (X,Y)";C1,A0R " FINAL COORDINATES (X,Y)";W1,XOR XXA:AC1W1: X0 8350`R: A0 8410qRD X0 8280RN A0 C15: 8290RX C11Rb (A)(X) 8330Rv "DIRECTION =";C1((((A)(X))(A))(A)): 8460 S "DIRECTION =";C1((A)(X)): 8460"S A0 C13: 8420;S X0 C15: 8290DS C17\S (A)(X) 8450S "DIRECTION =";C1((((X)(A))(X))(X)): 8460S!"DIRECTION =";C1((X)(A))S !"DISTANCE =";(X2A2): H81 1990S ! I: 1990/T4! B30 "FROM ENTERPRIZE TO STARBASE:":W1B4:XB5: 8120kT>!"MR SPOCK REPORTS 'SENSORS SHOW NO STARBASES IN THIS";TH!" QUADRANT.'": 1990T! *** FIND EMPTY PLACE IN QUADRANT (FOR THINGS)T!R1 R(1):R2 R(1):A$" ":Z1R1:Z2R2: 8830: Z30 8590U!4U! *** INSERT IN STRING ARRAY FOR QUADRANT ***TU!S8(Z2.5)3(Z1.5)241pU! (A$)3 "ERROR":U! S81 Q$A$(Q$,189):U! S8190 Q$(Q$,189)A$:U!Q$(Q$,S81)A$(Q$,190S8):VL" *** PRINTS DEVICE NAME FOR STATUS REPORT AND OTHER FUNCTIONS ***NVV" R1 8792,8794,8796,8798,8800,8802,8804,8806gVX"G2$"WARP ENGINES":VZ"G2$"SHORT RANGE SENSORS":V\"G2$"LONG RANGE SENSORS":V^"G2$"PHASER CONTROL":V`"G2$"PHOTON TUBES":Vb"G2$"DAMAGE CONTROL":Wd"G2$"SHIELD CONTROL":-Wf"G2$"LIBRARY-COMPUTER":_Wt" *** STRING COMPARISON IN QUADRANT ARRAY ***W~"Z1(Z1.5):Z2(Z2.5):S8(Z21)3(Z11)241:Z30W" (Q$,S8,3)A$ W"Z31:W2# *** QUADRANT NAME IN G2$ FROM Z4,Z5 (=Q1,Q2)$X<# *** CALL WITH G5=1 TO GET REGION NAME ONLY ***`XF# G54 Z4 9040,9050,9060,9070,9080,9090,9100,9110kXK# 9120XP#G2$"ANTARES": 9210XZ#G2$"RIGEL": 9210Xd#G2$"PROCYON": 9210Xn#G2$"VEGA": 9210Xx#G2$"CANOPUS": 9210X#G2$"ALTAIR": 9210Y#G2$"SAGITTARIUS": 92100Y#G2$"POLLUX": 9210cY# Z4 9130,9140,9150,9160,9170,9180,9190,9200{Y#G2$"SIRIUS": 9210Y#G2$"DENEB": 9210Y#G2$"CAPELLA": 9210Y#G2$"BETELGEUSE": 9210Y#G2$"ALDEBARAN": 9210Y#G2$"REGULUS": 9210Z#G2$"ARCTURUS": 9210%Z#G2$"SPICA"bZ# G51 Z5 9230,9240,9250,9260,9230,9240,9250,9260hZ${Z$G2$G2$" I":Z$G2$G2$" II":Z"$G2$G2$" III":Z,$G2$G2$" IV":