1 'GUNNER-2: MODIFICATION OF CREATIVE COMPUTING
2 'VERSION, INCORPORATING GRAPHICS, AMONG OTHER 
3 'CHANGES.
4 '          ERIC KNUDSON
5 '          946 WASHINGTON ROAD
6 '          GROSSE POINTE, MI 48230
10 PRINT CHR$(26)
12 PRINT"      GGG   U   U  N   N  N   N  EEEEE  RRRR"
14 PRINT"     G   G  U   U  NN  N  NN  N  E      R   R"
16 PRINT"     G      U   U  NN  N  NN  N  E      R   R"
18 PRINT"     G  GG  U   U  N N N  N N N  EEEE   RRRR
20 PRINT"     G   G  U   U  N  NN  N  NN  E      R   R"
22 PRINT"     G   G  U   U  N  NN  N  NN  E      R   R"
24 PRINT"      GGG    UUU   N   N  N   N  EEEEE  R   R"
30 PRINT
40 DIM X(100),Y(100)
50 DIM A$(80)
60 DIM YNOW(128)
70 DEFSNG P
100 INPUT "NAME, PLEASE";Z$
130 PRINT Z$" IS THE OFFICER-IN-CHARGE,"
135 PRINT"GIVING ORDERS TO A GUN CREW,"
140 PRINT"TELLING THEM THE DEGREES OF ELEVATION (S)HE ESTIMATES"
150 PRINT "WILL PLACE A PROJECTILE ON TARGET."
155 PRINT"A HIT WITH 3% OF THE DISTANCE"
160 PRINT "TO THE TARGET WILL DESTROY IT.":PRINT
165 INPUT"INPUT GUN CALIBER";C:RANDOMIZE C
170 V=INT(1000*RND(1)+200)
171 G=32.2:ST=0
172 R=V*V/G
175 RR=.03*R
176 PRINT CHR$(26)
180 PRINT "MAXIMUM RANGE OF YOUR GUN IS";R;"YARDS."
185 ZZ=0
190 PRINT
195 SS=0
200 T=INT(R*(.1+.8*RND(1)))
210 S=0
220 GOTO 370
230 PRINT "MINIMUM ELEVATION IS 1 DEGREE."
240 GOTO 390
250 PRINT "MAXIMUM ELEVATION IS 89 DEGREES."
260 GOTO 390
270 PRINT"OVER TARGET BY";ABS(E);"YARDS, AT";ATEMP;"ELEVATION."
280 GOTO 390
290 PRINT"SHORT OF TARGET BY";ABS(E);"YARDS, AT";ATEMP;"ELEVATION."
300 GOTO 390
320 PRINT "***TARGET DESTROYED***";S;"ROUNDS OF AMMUNITION EXPENDED"
325 ST=ST+S
330 IF ZZ=4 THEN 490
340 ZZ=ZZ+1
345 PRINT
350 PRINT "THE FORWARD OBSERVER HAS SIGHTED MORE ENEMY ACTIVITY..."
360 GOTO 200
370 PRINT "    DISTANCE TO THE TARGET IS";T;"YARDS."
380 PRINT
390 PRINT
400 PRINT"RANGE =";R:PRINT"TARGET =";T
410 INPUT"ELEVATION";A
420 IF A>89 THEN 250
430 IF A<1 THEN 230
433 ATEMP=A
435 A=A*3.14159265#/180
440 S=S+1
442 IF S<6 THEN 450
444 PRINT:PRINT "BOOM!!!! YOU HAVE JUST BEEN DESTROYED";
446 PRINT" BY THE ENEMY.":PRINT:PRINT:PRINT:GOTO 500
450 IP=V*V*SIN(2*A)/G:X=T-IP:E=INT(X)
455 GOSUB 600
460 IF ABS(E)<RR THEN 320
470 IF E>RR THEN 290
480 GOTO 270
490 PRINT:PRINT:PRINT"TOTAL ROUNDS EXPENDED WERE:";ST
491 IF ST>18 THEN 499
492 IF ST>11 THEN 498
493 IF ST>8 THEN 497
494 PRINT"DID YOU CHEAT?":GOTO 500
497 PRINT"FANTASTIC SHOOTING, "Z$"!!! YOU ARE AWARDED A MEDAL.":GOTO 500
498 PRINT"NICE SHOOTING, "Z$".":GOTO 500
499 PRINT"BETTER GO BACK TO FORT SILL FOR MORE TRAINING, "Z$"."
500 PRINT:INPUT"TRY AGAIN (Y/N)";OK$
510 IF OK$="Y" THEN 170
520 PRINT"OK -- RETURN TO BASE CAMP."
530 END
600 SA=SIN(A):S2A=SIN(2*A)
610 CA=COS(A)
620 TOTIME=2*V*SA/G
630 TODIST=V*V*S2A/G
640 SUX=CINT(52*TODIST/T)
645 IF SUX>128 THEN PRINT"YOU MUST BE KIDDING":RETURN
650 TINCR=TOTIME/SUX
660 FOR I=1 TO SUX
670 TNOW=I*TINCR
680 YPOS=TNOW*(V*SA-G*TNOW/2)
690 YNOW(I)=CINT(24*YPOS/T)
700 IF YPOS>T THEN YNOW(I)=999
710 NEXT I
720 PRINT CHR$(26)
730 FOR I=1 TO 23
740 P=64384!-128*I
750 POKE P,124
760 NEXT I
770 POKE 64384!,67
780 FOR I=1 TO 52
790 P=64384!+I
800 POKE P,95
810 NEXT I
820 POKE 64435!,84
830 FOR I=1 TO SUX
840 IF YNOW(I)=999 THEN 870
850 P=64384!+I-128*YNOW(I)
860 POKE P,42
870 NEXT I
880 RETURN
999 END

830 FOR I=1 TO SUX
840 IF YNOW(I)=999 THEN 870
850 P=64384!+I-128*YNOW(I)
860 POKE P,