The Best of Creative Computing Volume 1 (published 1976)

Page 278 << PREVIOUS >> NEXT Jump to page:
Go to contents Go to thumbnails

Super Star Trek

graphic of page

1300 INPUT AB
1310 REM HERE ANY TIME NEW QUADRANT ENTERED
1320 Z4=Q1
1330 Z5=Q2
1340 K3=0
1350 B3=0
1360 S3=0
1370 G5=0
1380 D4=.5*RND(1)
1390 IF Q1<1 THEN GOTO 1600
1400 IF Q1>8 THEN GOTO 1600
1410 Q2<1 THEN GOTO 1600
1420 Q2>8 THEN GOTO 1600
1430 GOSUB 9030
1440 PRINT
1450 IF T<>T0 THEN 1490
1460 PRINT"YOUR MISSION BEGINS WITH YOUR STARSHIP LOCATED"

1470 PRINT"IN THE GALACTIC QUADRANT, '";G2$;"'."

1480 GOTO 1500
1490 PRINT"NOW ENTERING ";G2$;" QUADRANT . . ."

1500 PRINT
1510 X=G(Q1,Q2)*.01
1520 K3=INT(X)
1530 B3=INT((X-K3)*10)
1540 S3=G(Q1,Q2)-INT(G(Q1,Q20*.1)*10
1550 IF K3=0 THEN GOTO 1590
1560 PRINT "COMBAT AREA      CONDITION RED"

1570 IF S>200 THEN GOTO 1590
1580 PRINT "   SHIELDS DANGEROUSLY LOW"

1590 MAT K=2ER
1600 FOR I=1 TO 3
1610   LET R(I,J)=0
1620 NEXT I
1630 LET Q$=Z$
1640 LET Q$=Z$
1650 LET Q$=Z$(1,40)
1660 REM POSITION ENTERPRISE IN QUADRANT, THEN PLACE "K3" KLINGONS,
1670 REM "B3" STARBASES, & "S3" STARS ELSEWHERE.

1680 A$="<*>"

1690 Z1=S1
1700 Z2=S2
1710 GOSUB 8670
1720 FOR I=1 TO K3
1730   GOSUB 8590
1740   LET A$="+K+"

1750   LET Z1=R1
1760   LET Z2=R2
1770   GOSUB 8670
1780   LET K(I,1)=R1
1790   LET K(I,2)=R2
1800   LET K(I,3)=S9
1810 NEXT I
1820 FOR I=1 TO S3
1830   GOSUB 8590
1840   LET A$=">!<"

1850   LET Z1=R1
1860   LET B4=R1
1870   GOSUB 8670
1880   LET Z2=R2
1890   LET B5=R2
1900 NEXT I
1910 FOR I=1 TO S3
1920   GOSUB 8590
1930   LET A$=" * "

1940   LET Z1=R1
1950   LET Z2=R2
1960   GOSUB 8670
1970   NEXT I
1980 GOSUB 6430
1990 IF S+E>10 THEN GOTO 2020
2000 IF E>10 THEN GOTO 2060
2010 IF D(7)=0 THENGOTO 2060
2020 PRINT "** FATAL ERROR **   YOU'VE JUST STRANDED YOUR SHIP IN SPACE!!"

2030 PRINT "YOU HAVE INSUFFICIENT MANEUVERING ENERGY, AND SHIELD CONTROL,"

2040 PRINT "IS PRESENTLY INCAPABLE OF CROSS-CIRCUITING TO ENGINE ROOM!!"

2050 GOTO 6220
2060 PRINT "COMMAND"

2070 INPUT A$
2080 FOR I=1 TO 9
2090 IF A$(1,10)<>AL$(1,1) THEN GOTO 2160
2100 IF I<>2 THEN GOTO 2140
2110 IF LON<A$><2 THEN GOTO 2140
2120 IF A$(2,2)="R" THEN GOTO 2140
2130 LET I-6
2140 ON I THEN GOTO 2300,1980,4000,4260,4700,5530,5690,7290
2150 IF A$="XXX" THEN GOTO 6270
2160 NEXT I
2170 PRINT "ENTER ONE OF THE FOLLOWING:"

2180 PRINT"  NAV  (TO SET COURSE)"

2190 PRINT"  SRS  (FOR SHORT RANGE SENSOR SCAN)"

2200 PRINT"  LRS  (FOR LONG RANGE SENSOR SCAN)"

2210 PRINT"  PHA  (TO FIRE PHASERS)"

2220 PRINT"  TOR  (TO FIRE PHOTON TORPEDOES)"

2230 PRINT"  SHE  (TO RAISE OR LOWER SHIELDS)"

2240 PRINT"  DAM  (FOR DAMAGE CONTROL REPORTS)"

2250 PRINT"  COM  (TO CALL ON LIBRARY-COMPUTER)"

2260 PRINT"  XXX  (TO RESIGN YOUR COMMAND)"

2270 PRINT
2280 GOTO 1990
2290 REM COURSE CONTROL BEGINS HERE
2300 PRINT "COURSE (0-9)";
2310 INPUT C1
2320 IF C1>=1 THEN GOTO 2350
2330 PRINT"   LT. SULU REPORTS, 'INCORRECT COURSE DATA, SIR!'"

2340 GOTO 1990
2350 IF C1<9 THEN GOTO 2380
2360 IF C1>9 THEN GOTO 2330
2370 LET C1=1
2380 PRINT "WARP FACTOR (0-0)",
2390 INPUT W1
2340 IF W1>0 THEN GOTO 2420
2410 IF W1<=8 THENGOTO 2450
2420 PRINT "   CHIEF ENGINEER SCOTT REPORTS 'THE ENGINES WON'T TAKE";
2430 PRINT " WARP ";W1;"!'"

2440 GOTO 1990
2450 IF D(1)>=0 THEN GOTO 2490
2460 IF W1<=.2 THEN 2490
2470 PRINT "WARP ENGINES ARE DAMAGED.  MAXIUM SPEED = WARP 0.2"

2480 GOTO 2300
2490 LET N=INT(W1*8+.5)
2500 IF E-N>=0 THEN GOTO 2590
2510 PRINT"ENGINEERING REPORTS   'INSUFFICIENT ENERGY AVAILABLE"

2520 PRINT"                       FOR MANEUVERING AT WARP";W1;"!'"

2530 IF S<N-E THEN GOTO 1990
2540 D(7)<0 THEN GOTO 1990
2550 PRINT "DEFLECTOR CONTROL ROOM ACKNOWLEDGES";S;"UNITS OF ENERGY"

2560 PRINT "                         PRESENTLY DEPLOYED TO SHIELDS."

2570 GOTO 5530
2580 REM KLINGONS MOVE/FIRE ON MOVING STARSHIP . . .

2590 FOR I=1 TO K3
2600   IF K(I,3)=0 THEN GOTO 2700
2610   LET A$="   "

2620   LET Z1=K(I,1)
2630   LET Z2=K(I,2)
2640   GOSUB 8670
2650   GOSUB8590
2660   LET K(I,1)=Z1
2670   LET K(I,2)=Z2
2680   LET A$="+K+"

2690   GOSUB 8670
2700 NEXT I
2710 GOSUB 6000
2720 LET D1=0
2730 LET D6=W1
2740 IF W1>=1 THEN GOTO 2770
2750 LET D6=1
2760 REM MAKE REPAIRS TO SHIP
2770 FOR I=1 TO 8
2780   IF D(I)>=0 THEN GOTO 2880
2790   LET D(I)=D(I)+D6
2800   IF D(I)<0 THEN GOTO 2880
2810   IF D1=1 THEN GOTO 2840
2820   LET D1=1
2830   PRINT"DAMAGE CONTROL REPORT:  ";
2840 PRINT TAB(8);
2850 R1=I
2860 GOSUB 8790
2870 PRINT " REPAIR COMPLETED."

2880 NEXT I
2890 REM DAMAGE/IMPROVEMENT DURING SOME YES
2900 IF RND(1)>.2 THEN GOTO 3070
2910 LET R1=INT(RND(1)+0=1)
2920 IF RND(1)>=.6 THEN GOTO 3000
2930 LET D(R1)=D(R1)-(RND(1)*5+1)
2940 PRINT
2950 PRINT "DAMAGE CONTROL REPORT:  ";
2960 GOSUB 8790
2970 PRINT " DAMAGED"

2980 PRINT
2990 GOTO 3070
3000 LET D(R1)=D(R1)+RND(1)*3+1
3010 PRINT
3020 PRINT "DAMAGE CONTROL REPORT:  ";
3030 GOSUB 8790
3040 PRINT " STATE OF REPAIR IMPROVED"

3050 PRINT
3060 REM BEGIN MOVING STARSHIP
3070 LET A$="   "

3080 LET Z1=INT(S1)
3090 LET Z2=INT(S2)
3100 GOSUB 8670
3110 X1=C(C1,1)+(C(C1+1,1)-C(C1,1))*(C1-INT(C1))
3120 X=S1
3130 Y=S2
3140 X2=C(C1,2)+(C(C1+1,2)-C(C1,2))*(C1-INT(C1))
3150 Q4=Q1
3160 Q5=Q2
3170 FOR I=1 TO N
3180   LET S1=S1+X1
3190   LET S2=S2+X2
3200   IF S1<1 THEN GOTO 3500
3210   IF S1>=9 THEN GOTO 3500
3220   IF S2<1 THEN GOTO 3500
3230   IF S2>=9 THEN GOTO 3500
3240   LET S8=INT(S1)*24+INT(S2)*3-26
3250   IF S8>2 THEN GOTO 3200
3260   IF Q$(S0,S8+2)="   " THEN GOTO 3360
3270   GOTO 3320
3280   IF S$>144 THEN GOTO 3310
3290   IF R$[S0-72,S0-70)="   " THEN GOTO 3360
3300   GOTO 3320
3310   IF S$[S0-144,S0-142]="   " THEN GOTO 3360
3320   LET S1=S1-X1
3330   LET S2=S2-X2
3340   PRINT "WARP ENGINES SHUT DOWN AT SECTOR";S1;",";S2;"DUE TO BAD
NAVAGATION";
3350   GOTO3370
3360 NEXT I
3370 A$="<*>"

3380 Z1=INT(S1)
3390 Z2=INT(S2)
3400 GOSUB8670
3410 GOSUB3910
3420 T8=1
3430 IF W1>1 THEN GOTO 3450 
3440 LET T8=.1*INT(10*W1)
3450 LET T=T+T8
3460 IF T>T0+T9 THEN GOTO 6220
3470 REM SEE IF DOCKED, THEN GET COMMAND
3480 GOTO 1980
3490 REM EXCEEDED QUADRANT LIMITS
3500 X=8*Q1+X+N*X1
3510 Y=8*Q2+Y+N*X2
3520 Q1=INT(X/8)
3530 Q2=INT(Y/8)
3540 S1=INT(X-Q1*8)
3550 S2=INT(Y-Q2*8)
3560 IF S1<>0 THEN GOTO 3590
3570 Q1=Q1-1
3580 S1=8
3590 IF S2=0 THEN GOTO 3620
3600 Q2=Q2-1
3610 S2=8
3620 X5=0
3630 IF Q1<1 THEN GOTO 3670
3640 X5=1
3650 Q1=1
3660 S1=1
3670 IF Q1>8 THEN GOTO 3710
3680 X5=1
3690 Q1=8
3700 S1=8
3710 IF Q2<1 THEN GOTO 3750
3720 X5=1
3730 Q2=1
3740 S2=1
3750 IF Q2>8 THEN GOTO 3790
3760 X5=1
3770 Q2=8
3780 S2=8
3790 IF X5=0 THEN GOTO 3860
3800 PRINT "LT. UHURA REPORTS MESSAGE FROM STARFLEET COMMAND:"

3810 PRINT "  'PERMISSION TO ATTEMPT CROSSING OF GALACTIC PERIMETER"

3820 PRINT "  IS HEREBY *DENIED*.  SHUT DOWN YOUR ENGINES.'"

3830 PRINT "CHIEF ENGINEER SCOTT REPORTS  'WARP ENGINES SHUT DOWN"

3840 PRINT "  AT SECTOR "S1", "S2" OF QUADRANT "Q1","Q2".'"

3850 IF T>T0+T9 THEN GOTO 6220
3860 IF 8*Q1+Q2=8*Q4+Q5 THEN GOTO 3370
3870 T=T+1
3880 GOSUB 3910
3890 GOTO1320
3900 REM MANEUVER ENERGY S/R **
3910 E=E-N-10
3920 IF E>=0 THEN GOTO 1900
3930 PRINT "SHIELD CONTROL SUPPLIES ENERGY TO COMPLETE THE MANEUVER."

Page 278 << PREVIOUS >> NEXT Jump to page:
Go to contents Go to thumbnails