10 DIM A(20,50),B(2,6)
20 NL$=CHR$(&HA): CR$=CHR$(&HD)
30 A8=20:A9=50:SPEED=10:N2=10
40 PRINT CHR$(&H1A): RANDOMIZE:PRINT CHR$(&H1A)
50 PRINT
60 PRINT
70 PRINT "YOU ARE THE ('*'). THE ATTACKERS ARE THE ('$')."
80 PRINT "THE MINES ARE THE ('X'). THE TANK IS ('&')."
90 PRINT
100 PRINT"THE TANK CAN HIT A MINE WITHOUT BEING DAMAGED"
110 PRINT"THE TANK CAN DESTROY YOU OR THE ATTACKERS"
120 PRINT"THE ATTACKERS WILL CHASE YOU SO MANUVER YOURSELF"
130 PRINT"    SO THAT THE ATTACKERS WILL RUN INTO MINES "
140 PRINT"SCORE IS THE TIME YOU REMAIN ON THE BOARD"
150 PRINT"NO POINTS ARE AWARDED FOR KILLING THE ATTACKERS"
160 PRINT
170 POKE -4096+14+(128*3),&HD
180 POKE -4096+43+(128*3),&H0
190 POKE -4096+20+(128*4),&H7F
200 POKE -4096+39+(128*4),&HC
210 PRINT "MOVE BY TEN KEY PAD USED AS A JOY STICK: "
220 PRINT:PRINT "7 UP/LEFT   8 UP        9 UP/RIGHT"
230 PRINT "4 LEFT      5 JUMP      6 RIGHT"
240 PRINT "1 DOWN/LEFT 2 DOWN      3 DOWN/RIGHT"
250 PRINT
260 PRINT "JUMP (5) WILL PUT YOU ANYWHERE (EVEN ON A MINE)."
270 PRINT "NO MOVE WILL LEAVE YOU WHERE YOU ARE."
280 PRINT "YOU HAVE ONLY ";N2;" CHANCES TO USE JUMP (5)."
290 PRINT:PRINT "MAKE SURE WIDTH IS LARGER THAN 64":PRINT "OR GAME WILL NOT PRINT CORRECTLY":PRINT
300 INPUT "HIT ENTER TO START GAME";ANS$
310 PRINT CHR$(&H1A):JJ=0:N2=10
320 FOR U=0 TO ((2*A8)+2):PRINT CHR$(&HA):NEXT U
330 PRINT CHR$(&HA);:PRINT CHR$(&HB);:PRINT CHR$(&HB);
340 FOR B=1 TO A8:FOR C=1 TO A9:A(B,C)=20:X=INT(A9*RND)
350 IF X<>5 THEN 360 ELSE A(B,C)=5:POKE -4096+C+(128*B),&H7F
360 NEXT C:NEXT B:N3=0
370 FOR D =1 TO A9:A(1,D)=5:POKE -4096+D+(128*1),&H7F:A(A8,D)=5:POKE -4096+D+(128*A8),&H7F:NEXT D
380 FOR D = 1 TO A8:A(D,1)=5:POKE -4096+1+(128*D),&H7F:A(D,A9)=5:POKE -4096+A9+(128*D),&H7F:NEXT D
390 GOTO 420
400 H=INT(A8*RND)+1:I=INT(A9*RND)+1
410 IF A(H,I)<>20 THEN 400 ELSE RETURN
420 FOR D=1 TO 7:GOSUB 400
430 A(H,I)=15:POKE -4096+I+(128*H),&H0:IF D<>7 THEN 450
440 A(H,I)=10:POKE -4096+I+(128*H),&HD:J=H:K=I:GOTO 470
450 IF D<>1 THEN 460 ELSE A(H,I)=25:POKE -4096+I+(128*H),&HC
460 B(1,D)=H:B(2,D)=I
470 NEXT D
480 PRINT "                                 ";CHR$(&HD);"ESCAPE!";CHR$(&HD);
490 III = 0:Y=0:JJ=JJ+1:PRINT TAB(38);JJ;"SCORE/TIME";CHR$(&HD);
500 AAA$=""
510 AAA$=INKEY$
520 III=III+1
530 IF(AAA$="")AND(III<>SPEED) THEN 500 ELSE PRINT CHR$(&HD); :PRINT "       ";:PRINT CHR$(&HD);
540 IF AAA$="1" THEN Y=6
550 IF AAA$="2" THEN Y=7
560 IF AAA$="3" THEN Y=8
570 IF AAA$="4" THEN Y=5
580 IF AAA$="6" THEN Y=1
590 IF AAA$="7" THEN Y=4
600 IF AAA$="8" THEN Y=3
610 IF AAA$="9" THEN Y=2
620 IF AAA$="5" THEN Y=9
630 IF Y=0 THEN PRINT "NO MOVE";:PRINT CHR$(&HD);:GOTO 750
640 V=J:W=K:IF Y<9 THEN 660 ELSE IF N2<>0 THEN 710
650 PRINT "ILLEGAL";:PRINT CHR$(&HD);:GOTO 480
660 IF Y <> 1 THEN 670 ELSE J=0: GOTO 680
670 J=SGN(Y-5)
680 IF Y>3 THEN 700 ELSE IF Y=3 THEN 690 ELSE K=1: GOTO 740
690 K=0:GOTO 740
700 K=SGN(Y-7):GOTO 740
710 GOSUB 400
720 A(J,K)=20:POKE -4096+K+(128*J),&H20
730 J=H:K=I:N2=N2-1:GOTO 750
740 K=K+W:J=J+V
750 IF A(J,K)=5 THEN 1110 ELSE A(V,W)=20:POKE -4096+W+(128*V),&H20
760 A(J,K)=10:POKE -4096+K+(128*J),&HD:GOTO 1070
770 IF X<>99 THEN 780 ELSE RETURN
780 V=X:M=Y:X=SGN(J-X):Y=SGN(K-Y):X=X+V:Y=Y+M
790 IF A(X,Y)=10 THEN 1000 ELSE IF A(X,Y)=20 THEN 930
800 IF A(V,M)=25 THEN 890
810 IF A(X,Y)<>15 THEN 850 ELSE GOSUB 400
820 X=H:Y=M
830 PRINT "TWO ATTACKERS HAVE COLLIDED."; :PRINT CHR$(&HD);
840 A(V,M)=20:POKE -4096+M+(128*V),&H20:A(X,Y)=15:POKE -4096+Y+(128*X),&H0:RETURN
850 A(V,M)=20:POKE -4096+M+(128*V),&H20:IF A(X,Y)=25 THEN 860 ELSE A(X,Y)=20:POKE -4096+Y+(128*X),&H20 
860 GOSUB 880
870 X=99:RETURN
880 PRINT "KILLED ONE";:PRINT CHR$(&HD);:N3=N3+1:RETURN
890 IF A(X,Y)<>15 THEN 930 ELSE M9=2
900 IF B(1,M9)<>X THEN 910 ELSE IF B(2,M9)=Y THEN 920
910 M9=M9+1:GOTO 900
920 B(1,M9)=99:GOSUB 880
930 A(X,Y)=A(V,M):A(V,M)=20:POKE -4096+M+(128*V),&H20
940 IF A(X,Y)=5 THEN POKE -4096+Y+(128*X),&H7F
950 IF A(X,Y)=10 THEN POKE -4096+Y+(128*X),&HD
960 IF A(X,Y)=15 THEN POKE -4096+Y+(128*X),&H0
970 IF A(X,Y)=20 THEN POKE -4096+Y+(128*X),&H20
980 IF A(X,Y)=25 THEN POKE -4096+Y+(128*X),&HC  
990 RETURN
1000 PRINT "THE ENEMY FOUND YOU -- YOU'RE DEAD"
1010 IF A(X,Y)=5 THEN POKE -4096+Y+(128*X),&H7F
1020 IF A(X,Y)=10 THEN POKE -4096+Y+(128*X),&HD
1030 IF A(X,Y)=15 THEN POKE -4096+Y+(128*X),&H0
1040 IF A(X,Y)=20 THEN POKE -4096+Y+(128*X),&H20
1050 IF A(X,Y)=25 THEN POKE -4096+Y+(128*X),&HC
1060 GOTO 1120
1070 FOR D=1 TO 6:X=B(1,D):Y=B(2,D):GOSUB 770
1080 B(1,D)=X:B(2,D)=Y:NEXT D
1090 IF N3<>5 THEN 480
1100 PRINT "ALL OPPONENTS DESTROYED -- YOU WIN":GOTO 1120
1110 POKE -4096+K+(128*J),&HD:PRINT "YOU TOUCHED A MINE -- YOU ARE DEAD"
1120 INPUT "TRY AGAIN <TYPE 'N' FOR NO OR 'Y' FOR YES>";ANS$:IF (ANS$<>"0")AND(ANS$<>"N") THEN GOTO 310 ELSE PRINT CHR$(&H1A):END
