1 REM Modified by Jim Woolley, FOG Disk Librarian, 8/82
5 PRINT CHR$(26):WIDTH 80
10 PRINT  TAB(33);"ROCKET":PRINT
20 PRINT TAB(15);"CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY"
30 PRINT:PRINT:PRINT
70 PRINT "LUNAR LANDING SIMULATION"
80 PRINT "----- ------- ----------": PRINT
100 INPUT "DO YOU WANT INSTRUCTIONS (YES OR NO)";A$
110 IF LEFT$(A$,1)="N" THEN 390
160 PRINT CHR$(26)
200 PRINT "YOU ARE LANDING ON THE MOON AND HAVE TAKEN OVER MANUAL"
210 PRINT "CONTROL 500 FEET ABOVE A GOOD LANDING SPOT.  YOU HAVE A"
220 PRINT "DOWNWARD VELOCITY OF 50 FT/SEC.  120 UNITS OF FUEL REMAIN."
225 PRINT
230 PRINT "HERE ARE THE RULES THAT GOVERN YOUR SPACE VEHICLE:"
235 PRINT
240 PRINT "(1) AFTER EACH SECOND, THE HEIGHT, VELOCITY, AND REMAINING"
250 PRINT "    FUEL WILL BE REPORTED."
260 PRINT "(2) AFTER THE REPORT, A '?' WILL BE TYPED.  ENTER THE"
270 PRINT "    NUMBER OF UNITS OF FUEL YOU WISH TO BURN DURING THE"
280 PRINT "    NEXT SECOND.  EACH UNIT OF FUEL WILL SLOW YOUR DESCENT"
290 PRINT "    BY 1 FT/SEC."
310 PRINT "(3) THE MAXIMUM THRUST OF YOUR ENGINE IS 30 FT/SEC/SEC OR"
320 PRINT "    30 UNITS OF FUEL PER SECOND."
330 PRINT "(4) WHEN YOU CONTACT THE LUNAR SURFACE, YOUR DESCENT ENGINE"
340 PRINT "    WILL AUTOMATICALLY CUT OFF AND YOU WILL BE GIVEN A"
350 PRINT "    REPORT OF YOUR LANDING SPEED AND REMAINING FUEL."
360 PRINT "(5) IF YOU RUN OUT OF FUEL, THE '?' WILL NO LONGER APPEAR,"
370 PRINT "    BUT YOUR SECOND-BY-SECOND REPORT WILL CONTINUE UNTIL"
380 PRINT "    YOU CONTACT THE LUNAR SURFACE.":PRINT
385 LINE INPUT "ENTER 'RETURN' TO BEGIN. ";RESP$
390 PRINT CHR$(26):PRINT "BEGINNING LANDING PROCEDURE.....": PRINT
400 PRINT "G O O D   L U C K ! ! !"
420 PRINT:PRINT:PRINT
430 PRINT "SEC  FEET SPEED  FUEL  PLOT OF DISTANCE"
435 PRINT "---  ---- -----  ----  ----------------"
455 T=0:H=500:V=50:F=120
490 PRINT USING "###";T;:PRINT USING "####.#";H;:

    PRINT USING "####.#";V;:PRINT USING "####.#";F;:

    PRINT " |";TAB(H/18+24);"*"
491 B$="":PRINT "BURN? ";
492 A$=INKEY$
494 IF A$="" THEN 492
496 PRINT A$;
498 B=ASC(A$)
499 IF B=8 THEN PRINT " ";A$;:B$=LEFT$(B$,(LEN(B$)-1)):GOTO 492
500 IF B=13 THEN 508
501 IF B=46 THEN 504
502 IF B<48 OR B>57 THEN PRINT CHR$(13);SPC(20);CHR$(13);:GOTO 491
504 B$=B$+A$
506 GOTO 492
508 B=VAL(B$)
510 IF B<0 THEN 650
520 IF B>30 THEN B=30
530 IF B>F THEN B=F
540 V1=V-B+5
560 F=F-B
570 H=H-.5*(V+V1)
580 IF H<=0 THEN 670
590 T=T+1
600 V=V1
610 IF F>0 THEN 490
615 IF B=0 THEN 640
620 PRINT CHR$(22);"****  OUT OF FUEL  ****";CHR$(22)
640 PRINT USING"###";T;:PRINT USING"####.#";H;:PRINT USING"####.#";V;:PRINT USING"####.#";F;:PRINT " |";TAB(H/18+24);"*"
650 B=0
660 GOTO 540
670 PRINT CHR$(22);"****  CONTACT  ****";CHR$(22):PRINT
680 H=H+.5*(V+V1)
690 IF B=5 THEN 720
700 D=(-V+SQR(V*V+H*(10-2*B)))/(5-B)
710 GOTO 730
720 D=H/V
730 V1=V+(5-B)*D
760 PRINT "TOUCHDOWN AT";T+D;"SECONDS."
770 PRINT "LANDING VELOCITY =";V1;"FEET/SEC."
780 PRINT "UNITS OF FUEL REMAINING:";F
790 IF V1<>0 THEN 810
800 PRINT:PRINT "CONGRATULATIONS!  A PERFECT LANDING!"
805 PRINT "YOUR LICENSE WILL BE RENEWED.......LATER"
810 IF ABS(V1)<3 THEN 840
820 PRINT:PRINT "SORRY, BUT YOU BLEW IT!!!!"
830 PRINT "APPROPRIATE CONDOLENCES WILL BE SENT TO YOUR NEXT OF KIN."
840 PRINT: PRINT : PRINT
850 INPUT "ANOTHER MISSION";A$
860 IF LEFT$(A$,1)="Y" THEN 390
870 PRINT: PRINT "CONTROL OUT.": PRINT
999 RUN "MENU"
RINT
850 INP