0 	REM		C A N N O N S
1 REM			JUNE 15, 1977
2 	PRINT TAB(10);"C A N N O N S":PRINT TAB(10);"-------------------":PRINT:PRINT:PRINT
3 PRINT TAB(10);"ENTER YOUR NAME, COMMANDER ";
4 INPUT N$
5 INPUT "DO YOU WANT INSTRUCTIONS?";IN$
6 IF LEFT$(IN$,1)="Y" THEN 10
7 IF LEFT$(IN$,1)="N" THEN 199
8 PRINT "INVALID RESPONSE.":GOTO 5
10 PRINT 
12 PRINT TAB(5);"YOU GET TO FIRE AN ARTILLERY PIECE AT A"
13 PRINT TAB(5);"DISTANT TARGET. YOU MAY USE AS MANY SHOTS"
14 PRINT TAB(5);"AS YOU NEED BUT THE FEWER SHOTS, THE BETTER"
15 PRINT TAB(5) ;"YOUR SCORE."
16 PRINT TAB(5);"YOU MUST GIVE THE COMPUTER THE ANGLE AT"
17 	PRINT TAB(5);"WHICH TO AIM THE CANNON SO THAT THE PROJECTILE"
18 	PRINT TAB(5);"WILL STRIKE THE TARGET. THE ANGLE IS ENTERED"
19 PRINT TAB(5);"IN DEGREES AND MAY BE A DECIMAL FRACTION."
20 	PRINT TAB(5);"IF THE PROJECTILE STRIKES WITHIN 100 YARDS OF"
21 PRINT TAB(5);"THE TARGET IT IS CONSIDERED A HIT"
22 	PRINT TAB(5);"THE MAXIMUM RANGE IS 46,500 YARDS"
23 	PRINT
24	PRINT TAB(5);" G O O D L U C K !"
25 	PRINT:PRINT
26 W2=0
199 RANDOMIZE TIMER
200 TGT.DIST=43000-30000*RND
210 ROUNDS.FIRED=0
220 PRINT
230 IF W2 = 0 THEN GOTO 640
240 GOTO 680
250 PRINT "MINIMUM ELEVATION IS 1 DEGREE."
260 GOTO 690
270 PRINT "MAXIMUM ELEVATION IS 89 DEGREES."
280 GOTO 690
290 IF B>45 THEN GOTO 320
300 PRINT "OVER TARGET BY ";ABS(MISS.DIST);"YARDS - LOWER YOUR ELEVATION."
310 GOTO 690
320 PRINT "OVER TARGET BY ";ABS(MISS.DIST);"YARDS - RAISE YOUR ELEVATION."
330 GOTO 690
340 IF B>45 THEN GOTO 370
350 PRINT "SHORT OF TARGET BY ";ABS(MISS.DIST);"YARDS - RAISE YOUR ELEVATION."
360 GOTO 690
370 PRINT "SHORT OF TARGET BY ";ABS(MISS.DIST);"YARDS - LOWER YOUR ELEVATION."
380 GOTO 690
400	REM-------A H I T !!------------------------------
410 	PRINT
420 	PRINT CHR$(7)
430 	PRINT
440 PRINT "BANG!"
450 	PRINT
460 	PRINT
470 PRINT TAB(15);ROUNDS.FIRED;" ROUNDS EXPENDED!"
480 	IF ROUNDS.FIRED>20 THEN ROUNDS.FIRED=20
500 	ON ROUNDS.FIRED GOSUB 1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800
505 IF ROUNDS.FIRED>=20 THEN GOSUB 2900
510 	PRINT
	520 PRINT
565	REM------WANT ANOTHER TRY?------------------------------
570 	PRINT TAB(10);"WOULD YOU LIKE TO TRY AGAIN, COMMANDER ";N$;
580 	INPUT ANS$
590 	IF LEFT$(ANS$,1)="Y" THEN GOTO 640
600 IF LEFT$(ANS$,1)="N" THEN 630
610 		PRINT TAB(10);"I DON'T UNDERSTAND YOU, COMMANDER" :GOTO 565
630 	PRINT:PRINT
631 	PRINT TAB(15);"THIS IS FIRE CONTROL . . ."
632 	PRINT TAB(15);"  SIGNING OFF"
633 	PRINT
634 END
640 PRINT
650 	PRINT TAB(10);"THE TARGET IS IN SIGHT!"
660 W2=1
670 PRINT
675 GOTO 200
680	REM
685 	PRINT TAB(10);"DISTANCE TO TARGET IS ";INT(TGT.DIST);"YARDS."
690 PRINT
700 PRINT "ELEVATION:";
710 INPUT ELEVATION
720 IF ELEVATION = 90 THEN GOTO 820
730 IF ELEVATION<1 THEN GOTO 250
740 ROUNDS.FIRED = ROUNDS.FIRED + 1
750 B2=2*ELEVATION/57.3
760 SHOT.DIST=46500*SIN(B2)
770 MISS.DIST=INT(TGT.DIST-SHOT.DIST)
780 IF ABS(MISS.DIST)<100 THEN 400
790 IF MISS.DIST>100 THEN 340
800 IF MISS.DIST<-100 THEN 290
820 PRINT
830 PRINT "---------------> BANG!! YOU BLEW YOURSELF UP!! DING-A-LING!!"
840 PRINT
850 GOTO 565
1000	REM-----ONE SHOT!
1010 	PRINT TAB(10);" WOW!!"
1020 	PRINT
1030 	PRINT TAB(10);"THAT WAS GREAT! IT ONLY TOOK YOU ONE SHOT!"
1040 	PRINT
1050 	RETURN
1100	REM-----TWO SHOTS
1110 	PRINT TAB(10);"VERY FINE GUNNERY, COMMANDER ";N$
1120 	RETURN
1200	REM-----3
	1210 PRINT TAB(10);"YOU MAY GET A PROMOTION FOR THIS, ";N$;", SIR"
1220 	RETURN
1300	REM-----4
1310 	PRINT TAB(10);"WELL DONE"
1320 	RETURN
1400	REM-----5
1410 	PRINT TAB(10);"GOOD JOB, WE NEED MORE OFFICERS LIKE YOU"
1420 	RETURN
1500	REM-----6
1510 	PRINT TAB(10);"THAT WAS A SATISFACTORY PERFORMANCE"
1520 	RETURN
1600	REM-----7
1610 	PRINT TAB(10);"THAT WAS OK"
1620 	RETURN
1700	REM-----8
1710 	PRINT TAB(10);"I THINK THAT WITH SOME PRACTICE, YOU COULD DO OK"
1720 	RETURN
1800	REM-----9
1810 	PRINT TAB(10);"YOU WERE A LITTLE WASTEFUL OF AMMO, ";N$
1820 	RETURN
1900	REM-----10
1910 	PRINT TAB(10);"I DON'T THINK THAT YOU WERE EVEN TRYING"
1920 	RETURN
2000	REM-----11
2010 	PRINT TAB(10);"BETTER LUCK NEXT TIME"
2020 	RETURN
2100	REM-----12
2110 	PRINT TAB(10);"YOU'RE A PRETTY LOUSY SHOT, ";N$
2120 	RETURN
2200	REM-----13
2210 	PRINT TAB(10);"NOT BAD FOR A FOUR YEAR OLD"
2220 	RETURN
2300	REM-----14
2310 	PRINT TAB(10);"MAYBE YOU SHOULD STAY INSIDE WITH THE COOK"
2320 	RETURN
2400	REM-----15
2410 	PRINT TAB(10);"THAT WAS AWFUL"
2420 	RETURN
2500	REM-----16
2510 	PRINT TAB(10);"C'MON, GIVE SOMEONE ELSE A CHANCE!"
2520 	RETURN
2600	REM-----17
2610 	PRINT TAB(10);"TAKE COVER! RUN FOR YOUR LIFE!"
2620 	RETURN
2700	REM-----18
2710 	PRINT TAB(10);"I THINK YOU BLEW UP HEADQUARTERS"
2720 	RETURN
2800	REM-----19
2810 	PRINT TAB(10);"YOU GET THE GUNNERY BOOBY PRIZE"
2820 	RETURN
2900	REM-----20
2910 	PRINT TAB(10);"YOU ARE THE WORST SHOT I EVER SAW!!"
2920 	RETURN
