mirror of
https://github.com/rfivet/BCG101.git
synced 2024-12-18 08:06:27 -05:00
59 lines
1.9 KiB
QBasic
59 lines
1.9 KiB
QBasic
|
10 REM *** MODIFIED AND CONVERTED TO RSTS/E BY DAVID AHL, DIGITAL
|
||
|
90 RANDOMIZE
|
||
|
100 PRINT "THIS COMPUTER DEMONSTRATION SIMULATES THE"
|
||
|
110 PRINT"RESULTS OF FIRING A FIELD ARTILLERY WEAPON."
|
||
|
120 PRINT
|
||
|
130 PRINT"YOU ARE THE OFFICER-IN-CHARGE, GIVING ORDERS TO THE GUN"
|
||
|
140 PRINT"CREW, TELLING THEM THE DEGREES OF ELEVATION YOU ESTIMATE"
|
||
|
150 PRINT"WILL PLACE THE PROJECTILE ON TARGET. A HIT WITHIN 100 YARDS"
|
||
|
160 PRINT "OF THE TARGET WILL DESTROY IT. TAKE MORE THAN 5 SHOTS,"
|
||
|
170 PRINT "AND THE ENEMY WILL DESTROY YOU!"\PRINT
|
||
|
180 PRINT"MAXIMUM RANGE OF YOUR GUN IS 46500 YARDS."
|
||
|
185 Z=0
|
||
|
190 PRINT
|
||
|
195 S1=0
|
||
|
200 LET T=43000-30000*RND(X)
|
||
|
210 LET S=0
|
||
|
220 GO TO 370
|
||
|
230 PRINT"MINIMUM ELEVATION OF GUN IS ONE DEGREE."
|
||
|
240 GO TO 390
|
||
|
250 PRINT"MAXIMUM ELEVATION OF GUN IS 89 DEGREES."
|
||
|
260 GO TO 390
|
||
|
270 PRINT"OVER TARGET BY";ABS(E);"YARDS."
|
||
|
280 GO TO 390
|
||
|
290 PRINT "SHORT OF TARGET BY";ABS(E);"YARDS."
|
||
|
300 GO TO 390
|
||
|
310 GO TO 320
|
||
|
320 PRINT"***TARGET DESTROYED*** ";S;"ROUNDS OF AMMUNITION EXPENDED"
|
||
|
322 GOSUB 600
|
||
|
325 S1=S1+S
|
||
|
330 IF Z=4 THEN 490
|
||
|
340 Z=Z+1
|
||
|
345 PRINT
|
||
|
350 PRINT"THE FORWARD OBSERVER HAS SIGHTED MORE ENEMY ACTIVITY."
|
||
|
360 GO TO 200
|
||
|
370 PRINT" DISTANCE TO THE TARGET IS";INT(T);"YARDS....."
|
||
|
380 PRINT
|
||
|
390 PRINT
|
||
|
400 PRINT"ELEVATION:";
|
||
|
410 INPUT B
|
||
|
420 IF B>89 THEN 250
|
||
|
430 IF B<1 THEN 230
|
||
|
440 LET S=S+1
|
||
|
442 IF S<6 THEN 450
|
||
|
444 PRINT\PRINT "BOOM !!! YOU HAVE JUST BEEN DESTROYED ";
|
||
|
445 GOSUB 600
|
||
|
446 PRINT "BY THE ENEMY"\PRINT\PRINT\GOTO 495
|
||
|
450 LET B2=2*B/57.3\LET I=46500*SIN(B2)\LET X=T-I\LET E=INT(X)
|
||
|
460 IF ABS(E)<100 THEN 310
|
||
|
470 IF E>100 THEN 290
|
||
|
480 IF E<-100 THEN 270
|
||
|
490 PRINT\PRINT\PRINT "TOTAL ROUNDS EXPENDED WERE";S1
|
||
|
491 IF S1>15 THEN 495\PRINT "NICE SHOOTING !!"\GOSUB 600\GOTO 500
|
||
|
495 PRINT "BETTER GO BACK TO FORT SILL FOR REFRESHER TRAINING!"
|
||
|
500 PRINT\PRINT "THANK YOU FOR PLAYING!"
|
||
|
505 PRINT\PRINT "TRY AGAIN....."\PRINT\GOTO 180
|
||
|
600 FOR N=1 TO 10\PRINT CHR$(7);\NEXT N
|
||
|
610 RETURN
|
||
|
999 END
|