10 :REMARK \t\tBLAST.BAS\t\tVersion 05.02.81
20 :REMARK 
30 :REMARK Description:\tA video game of blasting.
40 :REMARK 
50 :REMARK SOURCE -->  TERRY L. PERRINO
60 :REMARK             CLAREMONT HIGH SCHOOL
70 :REMARK 
80 :REMARK \t\tModifications by H.U.G.
90 CLEAR 9000:WIDTH 255
100 E$=CHR$(27):E1$=E$+"E":F$=E$+"F":G$=E$+"G":Y$=E$+"Y":P$=E$+"p":Q$=E$+"q"
110 Y5$=E$+"y5":X5$=E$+"x5":H$=E$+"H"
120 DIM P$(3),S$(24),D(2),D$(4),C$(8),NX(4),NY(4),BD(4,2),SC(2),\n\tBX$(20),BY$(20),EX(2)
130 P$(0)="i":P$(1)=" ":P$(2)="w"
140 D$(1)="v":D$(2)="s":D$(3)="t":D$(4)="u"
150 EX(1)=2:EX(2)=1
160 FOR R=1 TO 4:READ BD(R,1):READ BD(R,2):NEXT R
170 DATA 5,1,5,1,-5,-1,-5,-1
180 FOR R=1 TO 8:READ C$(R):NEXT R
190 DATA "S","Z","A","W","6","2","4","8"
200 FOR R=1 TO 4:READ NX(R):READ NY(R):NEXT R
210 DATA 1,0,0,1,-1,0,0,-1
220 FOR W=2 TO 22:S$(W)=STRING$(80,105):NEXT
230 GOSUB 1170
240 PRINT E1$Y$"+?Initializing"X5$
250 FOR M=1 TO 60
260 X=INT(RND(1)*66)+5:Y=INT(RND(1)*17)+4
270 IF MID$(S$(Y),X,1)="i" THEN MID$(S$(Y),X,1)=P$(INT(RND(1)*2)+1)
280 NEXT M
290 FOR Y=10 TO 12:FOR X=2 TO 4:MID$(S$(Y),X,1)=" ":MID$(S$(Y),X+75,1)=" ":\n\tNEXT:NEXT
300 PRINT E1$"SCORE #1: 0"Y$" aSCORE #2: 0"
310 FOR P=1 TO 22:PRINT F$S$(P):NEXT P::REMARK \t\tPRINT BOARD
320 :REMARK \t\tMAKE OUTSIDE EDGE
330 S$(1)=STRING$(80,79):S$(23)=STRING$(80,79)
340 FOR M=2 TO 22:MID$(S$(M),1,1)="O":MID$(S$(M),80,1)="O":NEXT M
350 :REMARK \t\tPRINT OUTSIDE EDGE
360 PRINT P$Y$"! "SPACE$(80):PRINT Y$"7 "SPACE$(80);
370 FOR M=2 TO 22:PRINT Y$CHR$(M+32)"  ";
380 PRINT Y$CHR$(M+32)"o ";:NEXT M
390 PRINT Q$;
400 X(1)=2:X(2)=79:Y(1)=11:Y(2)=11:D(1)=1:D(2)=3
410 FOR P=1 TO 2
420 PRINT Y$CHR$(Y(P)+32)CHR$(X(P)+31)D$(D(P));
430 NEXT P
440 :REMARK \t\t\tSTART GAME
450 IF D1=7 OR D2=7 THEN 580
460 I$=INPUT$(1)
470 IF D1=7 THEN 500
480 FOR C=1 TO 4:IF I$=C$(C) THEN D=C:P=1:GOTO 600::REMARK \t\tGOTO MOVE MAN
490 NEXT C
500 IF D2=7 THEN 530
510 FOR C=5 TO 8:IF I$=C$(C) THEN D=C-4:P=2:GOTO 600
520 NEXT C
530 IF D1=7 THEN 550
540 IF I$=" " THEN P=1:D=D(P):GOTO 680::REMARK \t\t\tSHOOT BOMB
550 IF D2=7 THEN 450
560 IF I$="5" THEN P=2:D=D(P):GOTO 680
570 IF I$<>"E" THEN 450
580 PRINT G$Y5$E1$Y$"+= * End of session *"
590 RUN"MENU"
600 :REMARK \t\tMOVE MAN
610 IF MID$(S$(Y(P)+NY(D)),X(P)+NX(D),1)="O" THEN 450
620 IF D=D(P) THEN IF MID$(S$(Y(P)+NY(D)),X(P)+NX(D),1)<>" " THEN 450
630 IF D=D(P) THEN PRINT Y$;CHR$(Y(P)+32)CHR$(X(P)+31)" ";:GOTO 650
640 D(P)=D:GOTO 660
650 X(P)=X(P)+NX(D):Y(P)=Y(P)+NY(D)
660 PRINT Y$CHR$(Y(P)+32)CHR$(X(P)+31)D$(D);
670 GOTO 450
680 :REMARK \t\t\tSHOOT BOMB
690 IF MID$(S$(Y(P)+NY(D)),X(P)+NX(D),1)="O" THEN 450
700 X=X(P):Y=Y(P)
710 IF D=1 OR D=3 THEN 800
720 FOR Y=Y(P)+NY(D) TO Y(P)+BD(D,1) STEP BD(D,2)
730 IF Y<2 OR Y>22 THEN 450
740 PRINT Y$CHR$(Y+32)CHR$(X+31)"^"CHR$(8)" ";
750 IF MID$(S$(Y),X,1)="i" THEN 880::REMARK \t\tGIVE POINT FOR BLOCK
760 IF MID$(S$(Y),X,1)="w" THEN 940::REMARK \tGIVE POINT FOR BLOCKS AROUND MINE
770 IF X=X(EX(P)) AND Y=Y(EX(P)) THEN 1110
780 NEXT Y
790 GOTO 450
800 FOR X=X(P)+NX(D) TO X(P)+BD(D,1) STEP BD(D,2)
810 IF X<2 OR X>79 THEN 450
820 PRINT Y$CHR$(Y+32)CHR$(X+31)"^"CHR$(8)" ";
830 IF MID$(S$(Y),X,1)="i" THEN 880
840 IF MID$(S$(Y),X,1)="w" THEN 940
850 IF X=X(EX(P)) AND Y=Y(EX(P)) THEN 1110
860 NEXT X
870 GOTO 450
880 SC(P)=SC(P)+5
890 MID$(S$(Y),X,1)=" "
900 IF P<>1 THEN 920
910 PRINT Y$" )"SC(P);:GOTO 450
920 PRINT Y$" j"SC(P);
930 GOTO 450
940 :REMARK \t\t\tHIT A MINE
950 MID$(S$(Y),X,1)=" "
960 FOR Y1=Y-2 TO Y+2
970 FOR X1=X-2 TO X+2
980 IF X1=X(1) AND Y1=Y(1) THEN X(1)=2:Y(1)=11:D(1)=1:D1=D1+1: \n\tPRINT Y$"+!"D$(1);:GOTO 1030
990 IF X1=X(2) AND Y1=Y(2) THEN X(2)=79:Y(2)=11:D(2)=3:D2=D2+1: \n\tPRINT Y$"+n"D$(3);:GOTO 1030
1000 IF MID$(S$(Y1),X1,1)=" " THEN 1040
1010 IF MID$(S$(Y1),X1,1)="i" THEN SC(P)=SC(P)+5:MID$(S$(Y1),X1,1)=" ":GOTO 1030
1020 IF MID$(S$(Y1),X1,1)="w" THEN B=B+1:BX(B)=X1:BY(B)=Y1
1030 PRINT Y$CHR$(Y1+32)CHR$(X1+31)" ";
1040 NEXT X1
1050 NEXT Y1
1060 IF P<>1 THEN 1080
1070 PRINT Y$" )"SC(P);:GOTO 1090
1080 PRINT Y$" k"SC(P);
1090 IF B>0 THEN X=BX(B):Y=BY(B):B=B-1:GOTO 940
1100 GOTO 450
1110 :REMARK \t\tHIT OTHER PLAYER WITH BOMB
1120 IF D1=7 THEN 1140
1130 IF X=X(1) AND Y=Y(1) THEN X(1)=2:Y(1)=11:D(1)=1:D1=D1+1:PRINT Y$"+!"D$(1);
1140 IF D2=7 THEN 450
1150 IF X=X(2) AND Y=Y(2) THEN X(2)=79:Y(2)=11:D(2)=3:D2=D2+1:PRINT Y$"+n"D$(3);
1160 GOTO 450
1170 :REMARK \t\t\tINSTRUCTIONS
1180 PRINT E1$Y$" 9* Blast-out *"
1190 PRINT
1200 PRINT "\tThe game of BLAST is played on a 78x22 matrix.  The object of"
1210 PRINT "the game is to blast-out as many chips of dirt as possible.  Each"
1220 PRINT "chip is worth five points.  The game is over when any player is"
1230 PRINT "killed 7 times.  The player with the most points at the end of the"
1240 PRINT "game wins."
1250 PRINT F$"\ti - CHIP (WORTH FIVE POINTS)"
1260 PRINT "\tw - MINE (BLOWS UP ANYTHING WITHIN A 2-SPACE RADIUS)"
1270 PRINT "\t         MINE IS DETONATED BY SHOOTING DIRECTLY AT IT."
1280 PRINT "\t         ALL POINTS FROM THE EXPLOSION GO TO THE PLAYER"
1290 PRINT "\t         WHO DETONATED IT.  WARNING:  DON'T GET TOO CLOSE!"
1300 PRINT G$:PRINT "Players move as follows:"
1310 PRINT:PRINT "\tPlayer #1\t\tPlayer #2"
1320 PRINT "\t=========\t\t========="
1330 PRINT "\tA --> LEFT\t\t4 --> LEFT  (SAME AS ARROW ON H19 PAD)"
1340 PRINT "\tS --> RIGHT\t\t6 --> RIGHT             ''"
1350 PRINT "\tW --> UP\t\t8 --> UP                ''"
1360 PRINT "\tZ --> DOWN\t\t2 --> DOWN              ''"
1370 PRINT "To exit game before end, type 'E'.  Have fun!"
1380 PRINT Y$"70HIT any key to continue. "Y5$;:A$=INPUT$(1):RETURN
