10 REM ********** TARGET GAME FOR MICROSOFT BASIC VERSION 5.2 *********** 20 REM ******* WRITTEN BY JONATHAN WINTON 10/03/1983 ******** 30 REM ******* (c) 1983 ******* 40 GOSUB 2050 50 SHIPS=2 60 PRINT CHR$(26) 70 A=3:B=3 80 E=0 90 MISS=0 100 DIM NAP$(10),SCR(10) 110 E=E+1:QQ=QQ+1:INPUT "DO YOU WANT: 1=SINGLE, 2=DOUBLE SHOT FIRING";SH$ 120 INPUT "PLEASE TYPE IN A RANDOM NUMBER";DD:RANDOMIZE DD*3.12+DD 130 ' 140 A=INT(RND*25):IF A < 4 OR A > 18 THEN GOTO 140 150 B=INT(RND*100+1):IF B<3 OR B>71 THEN 150 160 A1$=" " 170 A1$=" " 180 A$="l--O--l" 190 PRINT CHR$(26) 200 DEF FNC$(X,Y)=CHR$(27)+CHR$(61)+CHR$(32+X)+CHR$(32+Y) 210 X$=STRING$(29,45) 220 PRINT FNC$(12,2);X$"|";FNC$(12,46);"|"X$ 230 FOR I=1 TO 5:PRINT FNC$(9+I,LEN(X$)+2);"|";TAB(19);"|":NEXT I 240 PRINT FNC$(9,LEN(X$)+1);"___";TAB(19);"___" 250 PRINT FNC$(15,LEN(X$)+1);"---";TAB(19);"---" 260 FOR I=1 TO 11:PRINT FNC$(I+6,1);"|" 270 NEXT I 280 FOR I=1 TO 11:PRINT FNC$(I+6,76);"|":NEXT I 290 Z$=STRING$(76,61) 300 PRINT FNC$(4,1);Z$ 310 RANDOMIZE A*2+(3.14159/2)/B 320 PRINT FNC$(2,2)"SCORE :";TS(1) 330 PRINT FNC$(2,20);"MISSES :";MISS 340 IF B<39 AND B>32 AND A>11 AND A<13 THEN PRINT FNC$(1,37);"!! IN RANGE !!" ELSE PRINT FNC$(1,40)" " 350 PRINT FNC$(2,60)"SHIPS LEFT :";SHIPS 360 PRINT FNC$(2,40);"SHOTS: ";SHOT 370 PRINT FNC$(21,1);Z$ 380 PRINT FNC$(A-1,B);A1$ 390 PRINT FNC$(A+1,B);A2$ 400 PRINT FNC$(A,B);B1$;A$;B2$ 410 IF A>10 AND A<14 AND B>30 AND B<39 AND INT(RND*100+1)<20 THEN GOSUB 1470 420 I$=INKEY$ 430 IF I$="4" THEN 660 440 IF I$="2" AND A=<2 THEN 220 450 IF I$="2" AND A=<5 THEN A$="" 460 IF I$="2" AND A=<4 THEN A2$="" 470 IF I$="2" AND A=<6 THEN A1$="" 480 IF I$="2" THEN B1$="":IF I$="2" THEN B2$="" 490 IF I$="2" AND A<=20 THEN A1$=" " 500 IF I$="2" AND A<=20 THEN A$="l--O--l" 510 IF I$="2" AND A<=20 THEN A2$=" " 520 IF I$="2" THEN A=A-1 530 IF I$="8" AND A>=21 THEN 220 540 IF I$="8" AND A=>5 THEN A$="l--O--l" 550 IF I$="8" AND A=>4 THEN A2$=" " 560 IF I$="8" AND A=>5 THEN A1$=" " 570 IF I$="8" THEN B1$="":IF I$="2" THEN B2$="" 580 IF I$="8" THEN A=A+1 590 IF I$="8" AND A>=21 THEN A$="" 600 IF I$="8" AND A>19 THEN A2$="" 610 IF I$="8" AND A>=22 THEN A1$="" 620 IF I$="6" AND B=<0 THEN 220 630 IF I$="6" AND B=<1 THEN A$=" " 640 IF I$="6" THEN B2$=" " 650 IF I$="6" THEN B=B-1 660 IF I$="4" AND B>71 THEN A$=" " 670 IF I$="4" AND B>72 THEN 220 680 IF I$="4" THEN B1$=" " 690 IF I$="4" THEN B=B+1 700 IF I$="F" THEN GOSUB 720 710 GOTO 220 720 IF SH$="2" THEN 840:Q=20:W=40 730 Q=20:W=38:QW$="O" 740 GOTO 780 750 PRINT FNC$(Q-1,W);" " 760 PRINT FNC$(Q,W);QW$ 770 PRINT FNC$(Q+1,W);" ":RETURN 780 FOR I=1 TO 3:Q=Q-1:GOSUB 750:FOR D=1 TO 50:NEXT D:NEXT I 790 QW$="o" 800 FOR I=1 TO 3:Q=Q-1:GOSUB 750:FOR D=1 TO 50:NEXT D:NEXT I 810 QW$="." 820 FOR I=1 TO 2:Q=Q-1:GOSUB 750:FOR D=1 TO 50:NEXT D:NEXT I 830 PRINT FNC$(Q,W-4);" ":GOTO 960 840 Q=20:W=27:W1=47 850 QW$="O" 860 GOTO 900 870 PRINT FNC$(Q-1,W);" ":PRINT FNC$(Q-1,W1);" " 880 PRINT FNC$(Q,W);QW$:PRINT FNC$(Q,W1);QW$ 890 PRINT FNC$(Q+1,W-1);" ":PRINT FNC$(Q+1,W1+1);" ":RETURN 900 FOR I=1 TO 3:Q=Q-1:W=W+1:W1=W1-1:GOSUB 870:FOR D=1 TO 50:NEXT D:NEXT I 910 QW$="o" 920 FOR I=1 TO 3:Q=Q-1:W=W+1:W1=W1-1:GOSUB 870:FOR D=1 TO 50:NEXT D:NEXT I 930 QW$="." 940 FOR I=1 TO 2:Q=Q-1:W=W+1:W1=W1-1:GOSUB 870:FOR D=1 TO 50:NEXT D:NEXT I 950 PRINT FNC$(Q,W-2);" " 960 ' 970 SHOT=SHOT+1:TS(1)=TS(1)-10:IF A=12 AND B>32 AND B<37 THEN TS(1)=TS(1)+100:IF A=12 AND B>32 AND B<37 THEN 130 980 MISS=MISS+1 990 GOTO 220 1000 PRINT CHR$(26) 1010 PRINT:PRINT:PRINT 1020 PRINT TAB(30);"SCORE :"TS(1) 1030 PRINT TAB(30);"SHOTS :"SHOT 1040 RANDOMIZE SC*2+(SHOT/3.33) 1050 OPEN "I",#1,"SCORES.DAT" 1060 FOR X=1 TO 10 1070 INPUT#1,NAP$(X),SCR(X) 1080 NEXT X 1090 CLOSE #1 1100 FOR X=1 TO 10 1110 IF TS(1)>SCR(X) THEN 1140 1120 NEXT X 1130 GOTO 1220 1140 PRINT CHR$(26):PRINT FNC$(10,20);"WOULD PLAYER 1 PLEASE ENTER HIS NAME"; 1150 INPUT NA$:IF LEN(NA$)>20 THEN PRINT"SHORTER PLEASE,":GOTO 1140 1160 FOR Y=10 TO X STEP -1 1170 ' SCR(Y+1)=SCR(Y) 1180 ' NAP$(Y+1)=NAP$(Y) 1190 NEXT Y 1200 SCR(X)=TS(1) 1210 NAP$(X)=NA$ 1220 OPEN "O",#2,"COPY" 1230 FOR X=1 TO 10 1240 PRINT #2,NAP$(X);",";SCR(X) 1250 NEXT X 1260 CLOSE #2 1270 KILL "SCORES.DAT" 1280 NAME "COPY" AS "SCORES.DAT" 1290 OPEN"I",#1,"SCORES.DAT" 1300 FOR X=1 TO 10 1310 INPUT#1,NAP$(X),SCR(X) 1320 NEXT X 1330 CLOSE #1 1340 PRINT CHR$(26):PRINT:PRINT:PRINT 1350 PRINT TAB(30);"HIGH SCORES":PRINT:PRINT 1360 FOR X=1 TO 10 1370 Q$="0" 1380 X$=STR$(SCR(X)) 1390 PRINT TAB(20);NAP$(X);TAB(45); 1400 FOR A=1 TO 10-LEN(X$) 1410 NEXT A 1420 Z$=MID$(X$,2,LEN(X$)-1) 1430 PRINT Z$ 1440 NEXT X 1450 PRINT:PRINT:PRINT 1460 INPUT "PLAY AGAIN (Y/N)";BR$:IF BR$="Y" THEN 110 ELSE CHAIN "BASICGAM" 1470 IF INT(RND*100)<25 THEN RETURN:PRINT FNC$(A,B);" . " 1480 FOR I=1 TO 250:NEXT 1490 PRINT FNC$(A,B);" o " 1500 FOR I=1 TO 250:NEXT 1510 PRINT FNC$(A,B);" O " 1520 FOR I=1 TO 250:NEXT 1530 PRINT FNC$(A-1,B);" _ " 1540 PRINT FNC$(A,B);" l_l " 1550 FOR I=1 TO 250:NEXT 1560 PRINT FNC$(A-1,B);" __ " 1570 PRINT FNC$(A,B);" l__l " 1580 PRINT FNC$(A-2,B);" _____ " 1590 PRINT FNC$(A-1,B);" l l " 1600 PRINT FNC$(A,B);" l_____l " 1610 FOR I=1 TO 250:NEXT I 1620 PRINT FNC$(A-3,B);" ______ " 1630 PRINT FNC$(A-2,B);"l l" 1640 PRINT FNC$(A-1,B);"l l" 1650 PRINT FNC$(A,B);"l______l" 1660 FOR I=1 TO 250:NEXT 1670 PRINT FNC$(A-3,B);" ________ " 1680 PRINT FNC$(A-2,B);"l l" 1690 PRINT FNC$(A-1,B);"l l" 1700 PRINT FNC$(A,B);"l l" 1710 PRINT FNC$(A+1,B);"l________l" 1720 FOR I=1 TO 250:NEXT 1730 PRINT FNC$(A-3,B-2);" ___________ " 1740 PRINT FNC$(A-2,B-2);"l l" 1750 PRINT FNC$(A-1,B-2);"l l" 1760 PRINT FNC$(A,B-2);"l l" 1770 PRINT FNC$(A+1,B-2);"l___________l" 1780 FOR I=1 TO 250:NEXT 1790 PRINT FNC$(A-3,B-3);" ______________ " 1800 PRINT FNC$(A-2,B-3);"l l" 1810 PRINT FNC$(A-1,B-3);"l l" 1820 PRINT FNC$(A,B-3) ;"l l" 1830 PRINT FNC$(A+1,B-3);"l l" 1840 PRINT FNC$(A+2,B-3);"l______________l" 1850 PRINT CHR$(30) 1860 PRINT:PRINT:PRINT 1870 PRINT 1880 PRINT " \_ l l \ / l _/ " 1890 PRINT " \ / l \ l / _/ " 1900 PRINT " \ l / l \ / l " 1910 PRINT " \ / / \ \ / / " 1920 PRINT " \ \ \ l l / _/ " 1930 PRINT " \__/ \ / l/____/ " 1940 PRINT " \ \ l _____/ " 1950 PRINT " \______ \ _/ / \ " 1960 PRINT " / \ l/ __/ \ " 1970 PRINT " _____/ \_____ ____/ ____/ l__ " 1980 PRINT " \ \ l\ l \ " 1990 PRINT " \______ \ __/ \ _______/\ / " 2000 PRINT " l \__/ \ __\ ___/ " 2010 PRINT " / \__ \ / / " 2020 PRINT " /__ \_______l \ " 2030 FOR HHI=1 TO 200:NEXT HHI 2040 SHIPS=SHIPS-1:IF SHIPS=0 THEN 1000 ELSE 140 2050 PRINT CHR$(26) 2060 PRINT "You are a pilot of the space ship 'AINTNOPRIZE' your mission is" 2070 PRINT "to destroy all U.F.O.'s trying to kill you. You only have two" 2080 PRINT "ships - after that it's all over. And if you are good enough" 2090 PRINT "you will be asked for your name !" 2100 PRINT:PRINT "Moves are -" 2110 PRINT " 4 = move sight left":PRINT " 6 = move sight right" 2120 PRINT " 2 = move sight down":PRINT " 8 = move sight up" 2130 PRINT " F = fire" 2140 PRINT:PRINT "* REMEMBER - you are controlling the sight not the U.F.O. so" 2150 PRINT "the controls may seem strange *" 2160 PRINT:PRINT "PRESS TO START";:INPUT CR 2170 RETURN t the U.F.O. so" 2150 PRINT "the controls may seem strange *" 2160 PRINT:PRINT "PRESS TO START";:INPUT CR 2170