Minefield
Sean Igo
Sean Igo
Your job is to get your trucks in quickly, defuse the bombs (especially the flashing ones which are about to go off), and get out as fast as you can. This game has four skill levels, and there are versions for VIC, 64, Apple, and PET.
In this game, you drive a truck around to gather and defuse time bombs before they explode - all the while avoiding mines and bomb craters.
Playing The Game
You find yourself in the center of a small minefield with several bombs, represented by circles, and a generous number of mines, shown as X's. Your truck is a diamond. To defuse the bombs, just run over them with the truck.
When the bombs first appear, they are innocent-looking little circles. After a short time - the rate varies from bomb to bomb - they turn reverse-field. This means watch it. Soon they begin to blink and you have only a few blinks to defuse them before they explode. Any mines (or heroic defusing teams) caught in the explosion will be instantly lost. Bombs caught in the explosion will explode, whether they were ready to or not.
Your truck can move in only four directions. It can "wrap around" all four edges of the screen. Don't run it into the mines or the craters (*) left by the bombs or your truck will be destroyed. Once you begin moving, your truck cannot stop until it is blown up or until the current minefield is cleared of bombs.
Skill Levels And Scoring
Minefield has four skill levels. Skill levels differ only in the number of trucks you get. Level 0, the easiest, has four trucks. Level one has three. Level two has two and level three has one.
Scoring: | 10 points for a normal bomb |
20 points for a reverse-field bomb | |
30 points for a blinking bomb | |
-10 points at the end of an
explosion for every bomb that went off.
This is incentive to defuse more than one or two bombs in the later
explosions. |
Notes
For VIC-20, C-64, And Apple Versions Of "Minefield" The VIC version will run on any VIC with at least a 3K expansion. Both the VIC and 64 versions are designed to be used with a joystick although the 64 also can be played using certain keys on the keyboard (see the instructions within the program). Since the Apple computer doesn't have a realtime clock, a loop is incremented and checked in this version to provide the necessary delay before the bombs explode. The familiar "I," "K," "J," and "M" keys are used in the Apple version to move the truck around the screen. |
Program 1: Minefield - PET/CBM Version
10 REM *** MINEFIELD FOR 40 COLUMN PETS
***
50 GOSUB 1130
60 REM ---INITIALIZE VARIABLES---
70 DIM BT(37),B3(37),B4(37),BP(37),BS(37)
,XM(4),YM(4),BC(25)
80 DEF FNY(X)=INT((X-32768)/40)
90 DEF FNX(X)=(X-40*FNY(X))-32768
100 DEF FNS(X)=32768+PX+40*PY
110 DEF FNP(X)=33051+INT(34*RND(1))+40*INT
(15*RND(1))
120 DEF FNN(X)=PEEK(FNS(X))
130 FORJ=1 TO 4:READ XM(J),YM(J):NEXT
140 DATA 0,1,-1,0,1,0,0,-1
150 SC=0:BT=1680:NB=4:NW=0
160 PRINT"{CLEAR}";:POKE 59468,12
170 PRINT"{REV}MINE****] SCORE: 0"
180 PRINT"{REV}********]{RIGHT}HI SCORE:";
HS
190 PRINT"{REV}***FIELD]{RIGHT}WAVE: 1"
200 PRINT"{REV} ]{RIGHT}";:IF NL<>1
THEN FORJ=1 TO NL-1:PRINT"Z";:NE
XT
210 FORD=32768 TO 32927:IFPEEK(J)=32 THEN ~
POKE J,160
220 NEXT
230 XP$="U]I{DOWN}(04 LEFT}UU]II{DOWN}{06
LEFT}UUU]III{DOWN}{07 LEFT @@@*@@
@{DOWN 07 LEFT}JJJ]KKK"
235 XP$=XP$+"{DOWN}{06 LEFT}JJ]KK{DOWN}{04
LEFT}J]K"
240 S$="{HOME}{24 DOWN)"
250 Q$="{40 RIGHT}"
260 XR$=" {DOWN}{04 LEFT) {DOWN}{06
LEFT} {DOWN}{07 LEFT} * ~
{DOWN}{07 LEFT} "
265 XR$=XR$+"{DOWN}{06 LEFT) {DOWN}{04
LEFT) "
270 REM ---SET UP NEXT WAVE---
280 BG=0:NW=NW+1:IF NW>ll THEN 310
290 NB=NB+1.5:IF NW=l THEN 330
300 IF NW<6 THEN BT=BT-180
310 PRINT"{HOME}{02 DOWN}{REV}";TAB(15);NW
320 POKE FNS(1),32:FORJ=1 TO NB:POKEBP(J),
32:NEXT
325 FORJ=l TO 25:POKE BC(J),32:NEXT
330 BN=INT(NB):FORJ=1 TO NB:BS(J)=1:NEXT
340 FORJ=l TO NB
350 BT(J)=(.4+INT(61*RND(1))/100)*BT
360 B3(J)=BT(J)+.5*BT(J):B4(J)=B3(J)+.25*B
T(J)
370 NEXT
380 PX=19:PY=15:POKE FNS(1),90
390 FORJ=l TO NB
400 BP(J)=FNP(1):IF PEEK(BP(J))<>32 THEN 4
00
410 POKE BP(J),87:NEXT:NN=0
415 FORJ=l TO 25
416 BC(J)=FNP(1):IF PEEK(BC(J))<>32 THEN 4
16
417 IF PEEK(BC(J)+1)=87 THEN 416
419 POKEBC(J),86:NEXT
420 GET R$:IF R$<>"" THEN 420
430 DR=0:TX=TI
440 REM ---GET COMMANDS---
450 GET R$:IF R$<"2" OR R$>"8" THEN 490
460 IF R$="3" OR R$="5" OR R$="7" THEN 490
470 DR=VAL(R$)/2
480 REM ---MOVE TRUCK---
490 IF DR=0 THEN 600
500 POKE FNS(1),32:PX=PX+XM(DR):PY=PY+YM(D
R)
510 IF PX<0 THEN PX=39
520 IF PX>39 THEN PX=0
530 IF PY<4 THEN PY=24
540 IF PY>24 THEN PY=4
550 X=FNN(1)
560 IF X=32 THEN POKE FNS(1),90:GOTO 600
570 IF X=42 OR X=86 THEN 960
580 GOTO 890
590 REM ---UPDATE BOMBS---
600 NN=NN+1:IF NN>INT(NB)THEN NN=1
610 IF BS(NN)=0 THEN 600
620 TG=TI-TX
630 IF TG>B4(NN) THEN Nl=NN:GOTO 720
640 IF BS(NN)>2 THEN 690
650 IF TG>BT(NN) THEN BS(NN)=2
660 IF TG>B3(NN) THEN BS(NN)=3
670 IF BS(NN)=1 THEN 450
680 IF BS(NN)=2 THEN POKE BP(NN),215:GOTO
450
690 IF BS(NN)=3 THEN POKE BP(NN),87:BS(NN)
=4:GOTO 450
700 IF BS(NN)=4 THEN POKE BP(NN),215:BS(NN
)=3:GOTO 450
710 REM ---BOMB EXPLODES---
720 TQ=TI:PD=0
725 X$="{OFF}"+LEFT$(S$,FNY(BP(Nl))-2)+LEF
T$(Q$,FNX(BP(N1))-1)
730 BS(N1)=0:N2=0:PRINTX$;XP$;
740 FORJ=l TO NB:X=PEEK(BP(J)):IF BS(J)=0
THEN 760
750 IF X<>87 AND X<>215 AND X<>218 THEN N2
=J
760 NEXT:IF FNN(1)<>90 AND FNN(1)<>218 THE
N PD=1
770 PRINTX$;XR$;
780 FORJ=ITONB:IF PEEK(BP(J))=32 AND BS(J)
<>0 THEN POKE BP(J),87-128*(BS(J)
>1)
790 NEXT:BN=BN-1
800 IF PD=1 THEN 960
810 IF BN=0 THEN 840
820 IF N2=0 THEN TX=TX+(TI-TQ):GOTO 450
830 Nl=N2:GOTO 725
840 PRINT"{HOME}{02 DOWN}(REV}";TAB(20);
850 FORJ=l TO 20:PRINT"{REV}COMPLETED{09
LEFT}";:FORK=1 TO 100:NEXT
860 PRINT"{REV} {09 LEFT}";:FORK=1
TO 100:NEXT:NEXT
870 SC=SC-10*(INT(NB)-BG):IF SC<0 THEN SC=
0
880 PRINT"{04 LEFT}{03 UP) {10
LEFT}";SC:GOTO 280
885 REM ---BOMB GATHERED---
890 BG=BG+1:TQ=TI:POKE FNS(1),218
895 FORJ=l TO NB:IF PEEK(BP(J))=218 THEN A
J=BS(J):BS(J)=0
900 NEXT
910 IF AJ=4 THEN AJ=3
920 SC=SC+10*AJ:PRINT"{HOME}{REV}";TAB(16)
;SC
930 BN=BN-1:IF BN=0 THEN 840
940 TX=TX+(TI-TQ):GOTO 450
950 REM ---PLAYER DESTROYED---
960 TQ=TI:FORJ=1 TO 20:POKE FNS(1),42:FORK
=1 TO 25:NEXT:POKE FNS(1),170
970 FORK=1 TO 25:NEXT:NEXT:POKE FNS(1),32:
NL=NL-1
980 POKE 32897+NL,160:DR=0:PX=19:PY=15
990 IF NL=0 THEN 1045
1000 IF BN=0 THEN 840
1010 GET R$:IF R$<>"" THEN 1010
1020 FORJ=ITONB:IF PEEK(BP(J))=32 AND BS(J)
<>0 THEN POKE BP(J),87-128*(BS(J)
>1)
1030 NEXT
1040 POKE FNS(1),90:TX=TX+(TI-TQ):GOTO 450
1045 IF SC>HS THEN HS=SC:PRINT"{HOME}{DOWN}
{REV}";TAB(19);HS
1050 FORJ=l TO 1500:NEXT:PRINT"{HOME}{02
DOWN}{REV}";TAB(20);"GAME OVER{
DOWN}{09 LEFT}PLAY AGAIN?";
1060 PRINT"(Y/N){04 LEFT}";
1080 PRINT"{REV}Y/{OFF}N{03 LEFT}";
1081 FORJ=l TO 99:NEXT
1082 PRINT"{OFF}Y{REV}/N{03 LEFT}";
1083 FORJ=l TO 99:NEXT
1084 GET R$:IF R$="Y" THEN 1110
1090 IF R$<>"N" THEN 1080
1100 PRINT"{CLEAR}LATER ON!":END
1110 GOSUB 1130:GOTO 150
1120 REM ---INSTRUCTIONS---
1130 PRINT"{CLEAR}{REV}M I N E F I E L D":P
OKE 59468,14
1140 PRINT"DO YOU NEED INSTRUCTIONS (Y/N)"
1150 GET R$:IF R$="N" THEN 1410
1160 IF R$<>"Y" THEN 1150
1170 PRINT"{CLEAR}{REV}M I N E F I E L D"
1180 PRINT"{DOWN}THE OBJECT OF THIS GAME IS
TO PICK UP"
1190 PRINT"AS MANY BOMBS AS YOU CAN BEFORE ~
THEY"
1200 PRINT"EXPLODE. TO PICK UP A BOMB, JUST
RUN"
1210 PRINT"OVER IT WITH YOUR TRUCK."
1220 PRINT"BOMBS WILL EXPLODE AFTER A SHORT
TIME."
1230 PRINT"IF A BOMB TURNS REVERSE-FIELD, B
E CARE-"
1240 PRINT"FUL WITH IT. IF IT STARTS TO BLI
NK, IT"
1250 PRINT"WILL VERY SHORTLY EXPLODE-WATCH ~
OUT!!"
1260 PRINT"BOMBS WILL CHAIN-REACT; ONE BOMB
CAUGHT"
1270 PRINT"IN ANOTHER'S EXPLOSION WILL ALSO
BLOW"
1280 PRINT"UP. IF YOU ARE CAUGHT IN A BOMB'
S "
1290 PRINT"EXPLOSION, YOU WILL BE BLOWN UP.
"
1300 PRINT"ALSO, DO NOT RUN INTO BOMB CRATE
RS (*)"
1310 PRINT"OR MINES (X) OR YOU'LL BE TOTALL
ED."
1320 PRINT"THE CONTOLS ARE: 8 TO GO UP"
1330 PRINT" 4 TO GO LEFT"
1340 PRINT" 6 TO GO RIGHT"
1350 PRINT" 2 TO GO DOWN"
1360 PRINT"YOUR TRUCK CANNOT STOP ONCE YOU ~
BEGIN"
1370 PRINT"MOVING. IT CAN WRAP-AROUND BOTH ~
THE"
1380 PRINT"THE TOP AND SIDES OF THE SCREEN.
"
1390 PRINT"{DOWN}PRESS RETURN TO CONTINUE";
1400 GET R$:IF R$<>CHR$(13) THEN 1400
1410 PRINT"{CLEAR}SELECT SKILL SETTING (0-3
)"
1420 GET R$:IF R$<"0" OR R$>"3" THEN 1420
1430 NL=4-VAL(R$):RETURN
Program 2: Minefield - VIC Version
45 POKE36879,8
50 GOSUB1410
60 REM ---INITIALIZE VARIABLES---
70 DIM BT(37),B3(37),B4(37),BP(37),BS(37)
,XM(4),YM(4),BC(25)
80 DEF FNY(X)=INT((X-FNV(X))/22)
85 DEF FNV(X)=4*(PEEK(36866)AND128)+64*(P
EEK(36869)AND120)
90 DEF FNX(X)=(X-22*FNY(X))-FNV(X)
95 DEF FNC(X)=37888+4*(PEEK(36866)AND128)
98 DEF FND(X)=FNC(X)-FNV(X)
100 DEF FNS(X)=FNV(X)+PX+22*PY
110 DEF FNP(X)=FNV(X)+178+INT(18*RND(1))+2
2*INT(11*RND(1))
120 DEF FNN(X)=PEEK(FNS(X))
130 FORJ=l TO 4:READ XM(J),YM(J):NEXT
140 DATA 1,0,-1,0,0,-1,0,1
150 SC=0:BT=(FNV(1)+360):NB=4:NW=0
160 PRINT"{CLEAR}";CHR$(142);
170 PRINT"{REV}{WHT}MINE****]SCORE: 0"
180 PRINT"{REV}{WHT}********]HI SCORE:";HS
;
190 PRINT"{HOME}{02 DOWN}{REV}***FIELD]WAV
E: 1"
200 PRINT"{REV}{WHT} ]{RIGHT}";:IF
NL<>1 THEN FORJ=l TO NL-1:PRINT"Z
";:NEXT
210 FORJ=FNV(1)TO FNV(1)+109:IFPEEK(J)=32
THEN POKE J,160:POKEJ+FND(1),1
220 NEXT
230 XP$="{RED}{DOWN}(08 RIGHT}{07 LEFT}U]I
{DOWN}{03 LEFT}U]I{DOWN}(07 LEFT)
{04 RIGHT}{LEFT} @*@{DOWN}{03
LEFT}J]K"
240 S$="{HOME}{22 DOWN}"
250 Q$="{WHT}{22 RIGHT}"
260 XR$="{WHT} {DOWN}{04 LEFT) {
DOWN}{06 LEFT) (DOWN}{07
LEFT) * {DOWN}(05 LEFT} ~
"
270 REM ---SET UP NEXT WAVE---
280 BG=0:NW=NW+1:IF NW>11 THEN 310
290 NB=NB+1.5:IF NW=1 THEN 330
300 IF NW<6 THEN BT=BT-99
310 PRINT"{HOME}{02 DOWN}{REV}";TAB(15);NW
320 POKE FNS(1),32:FORJ=1 TO NB:POKEBP(J),
32:NEXT
325 FORJ=l TO 25:POKE BC(J),32:NEXT
330 BN=INT(NB):FORJ=1 TO NB:BS(J)=1:NEXT
340 FORJ=l TO NB
350 BT(J)=((.4+INT(61*RND(1))/100)/.75)*BT
360 B3(J)=BT(J)+.3*BT(J):B4(J)=B3(J)+.20*B
T(J)
370 NEXT
380 PX=11:PY=11:POKE FNS(1),90:POKE(FNS(1)
+FND(1)),1
390 FORJ=l TO NB
400 BP(J)=(FNP(1)):IFPEEK(BP(J))<>32 THEN ~
400
410 POKE BP(J),87:POKEBP(J)+FND(1),1:NEXT:
NN=0
415 FORJ=l TO 25
416 BC(J)=FNP(1):IF PEEK(BC(J))<>32 THEN 4
16
417 IF PEEK(BC(J)+1)=87 THEN 416
419 POKEBC(J),86:POKEBC(J)+FND(1),5:NEXT
420 GET R$:IF R$<>"" THEN 420
430 DR=0:TX=TI
440 REM ---GET COMMANDS---
445 DR=2
450 POKE37154,127:R=NOTPEEK(37151)AND60-((
PEEK(37152)AND128)=0)
453 IFPEEK(37152)=119THENR=1
454 POKE37154,255:R=R*2
455 DR=INT(R):IFR<>0THENDR=INT(LOG(DR)/LOG
(2)):IFDR=5THENDR=2
460 IFPEEK(37152)=119THENDR=2
470 IFR=0THEN600
475 IFDR>4THENDR=0
480 REM ---MOVE TRUCK---
500 POKE FNS(1),32:PX=PX+XM(DR):PY=PY+YM(D
R)
510 IF PX<0 THEN PX=21
520 IF PX>21 THEN PX=0
530 IF PY<5 THEN PY=22
540 IF PY>22 THEN PY=5
550 X=FNN(1)
560 IF X=32 THEN POKE FNS(1),90:POKE(FNS(1
)+FND(1)),1:GOTO 600
570 IF X=42 OR X=86 THEN 960
580 GOTO 890
590 REM ---UPDATE BOMBS---
600 NN=NN+1:IF NN>INT(NB)THEN NN=1
610 IF BS(NN)=0 THEN 600
620 TG=INT(TI*1.03)-TX
630 IF TG>B4(NN) THEN Nl=NN:GOTO 720
640 IF BS(NN)>2 THEN 690
650 IF TG>BT(NN) THEN BS(NN)=2
660 IF TG>B3(NN) THEN BS(NN)=3
670 IF BS(NN)=1 THEN 450
680 IF BS(NN)=2 THEN POKE BP(NN),215:POKEB
P(NN)+FND(1),1:GOTO 450
690 IF BS(NN)=3 THEN POKE BP(NN),87:POKEBP
(NN)+FND(1),1:BS(NN)=4:GOTO 450
700 IF BS(NN)=4 THEN POKE BP(NN),215:POKEB
P(NN)+FNb(1),1:BS(NN)=3:GOTO 450
710 REM ---BOMB EXPLODES---
720 TQ=TI:PD=0
725 X$="{OFF}"+LEFT$(S$,FNY(BP(N1))-2)+LEF
T$(Q$,FNX(BP(N1))-1)
730 BS(Nl)=0:N2=0:PRINTX$;XP$;
740 FORJ=l TO NB:X=PEEK(BP(J)):IF BS(J)=0T
HEN760
750 IFX<>87ANDX<>215ANDX<>218THENN2=J
760 NEXT:IFFNN(1)<>90ANDFNN(1)<>218THENPD=
1
770 PRINTX$;XR$;
780 FORJ=ITONB:IF PEEK(BP(J))=32 AND BS(J)
<>0 THEN POKE BP(J),87-128*(BS(J)
>1)
790 NEXT:BN=BN-1
800 IF PD=1 THEN 960
810 IF BN=0 THEN 840
820 IF N2=0 THEN TX=TX+(TI-TQ):GOTO 450
830 N1=N2:GOTO 725
840 PRINT"{HOME}{02 DOWN}{REV}";TAB(20);
850 FORJ=l TO ll:PRINT"{02 RIGHT}{REV}COMP
LETED{11 LEFT}";:FORK=1 TO 100:NE
XT
860 PRINT"{REV} {11 LEFT}";:FORK
=1 TO 100:NEXT:NEXT
870 SC=SC-10*(INT(NB)-BG):IF SC<0 THEN SC=
0
880 PRINT"{HOME}{REV}";TAB(14);SC;:GOTO 28
0
885 REM ---BOMB GATHERED---
890 BG=BG+1:TQ=TI:POKE FNS(1),218:POKE(FNS
(1)+FND(1)),1
895 FORJ=l TO NB:IF PEEK(BP(J))=218 THEN A
J=BS(J):BS(J)=0
900 NEXT
910 IF AJ=4 THEN AJ=3
920 SC=SC+10*AJ:PRINT"{HOME}{REV}";TAB(14)
;SC
930 BN=BN-1:IF BN=0 THEN 840
940 TX=TX+(TI-TQ):GOTO 450
950 REM ---PLAYER DESTROYED---
960 TQ=TI:FORJ=1 TO 20:POKE FNS(1),42:FORK
=1 TO 25:NEXT:POKE FNS(1),170
970 FORK=1 TO 25:NEXT:NEXT:POKE FNS(1),32:
NL=NL-1
980 POKE FNV(1)+75+NL,160:DR=0:PX=11:PY=11
990 IF NL=0 THEN 1045
1000 IF BN=0 THEN 840
1010 GET R$:IF R$<>"" THEN 1010
1020 FORJ=ITONB:IF PEEK(BP(J))=32 AND BS(J)
<>0 THEN POKE BP(J),87-128*(BS(J)>l)
1030 NEXT
1040 POKE FNS(1),90:TX=TX+(TI-TQ):GOTO 450
1045 IF SC>HS THEN HS=SC:PRINT"{HOME}{DOWN}
{REV}";TAB(17);HS;
1050 FORJ=l TO l500:NEXT:PRINT"{HOME}{WHT}{
04 DOWN}{REV}";"GAME OVER{DOWN}{
WHT}{09 LEFT}PLAY AGAIN?";
1060 PRINT"(Y/N){04 LEFT}";
1080 PRINT"{REV}Y/{OFF}N(03 LEFT)";
1081 FORJ=l TO 99:NEXT
1082 PRINT"{OFF}Y{REV}/N[03 LEFT]";
1083 FORJ=1 TO 99:NEXT
1084 GET R$:IF R$="Y" THEN 1110
1090 IF R$<>"N" THEN 1080
1100 PRINT"{CLEAR}{WHT}LATER ON!":END
1110 GOSUB1410:GOTO 150
1400 GET R$:IF R$<>CHR$(13) THEN 1400
1410 PRINTCHR$(14);"{CLEAR}S{WHT}ELECT SKIL
L SETTING (0-3)"
1420 GET R$:IF R$<"0" OR R$>"3" THEN 1420
1430 NL=4-VAL(R$):RETURN
"Minefield," VIC-20 version.
Program 3: Minefield - 64 Version
30 REM MINEFIELD FOR C-64
45 POKE53280,0:POKE53281,0
50 GOSUB 1130
60 REM ---INITIALIZE VARIABLES---
70 DIM BT(37),B3(37),B4(37),BP(37),BS(37)
,XM(4),YM(4),BC(25)
80 DEF FNY(X)=INT((X-1024)/40)
90 DEF FNX(X)=(X-40*FNY(X))-1024
100 DEF FNS(X)=1024+PX+40*PY
110 DEF FNP(X)=1307+INT(34*RND(1))+40*INT(
15*RND(1))
120 DEF FNN(X)=PEEK(FNS(X))
130 FORJ=l TO 4:READ XM(J),YM(J):NEXT
140 DATA 0,-1,0,1,-1,0,1,0
150 SC=0:BT=1680:NB=4:NW=O:D=54272
160 PRINT"{CLEAR}";:POKE 53272,21
170 PRINT"{REV}{WHT}MINE****] SCORE: 0"
180 PRINT"{REV}{WHT}********]{RIGHT}HI SCO
RE:";HS
190 PRINT"{REV}{WHT}***FIELD]{RIGHT}WAVE: ~
1"
200 PRINT"{REV}{WHT} ]{RIGHT}";:IF ~
NL<>l THEN FORJ=l TO NL-1:PRINT"Z
";:NEXT
210 FORJ=1024 TO 1183:IFPEEK(J)=32 THEN PO
KE J,160:POKEJ+D,1
220 NEXT
230 XP$="{RED}U]I{DOWN}{04 LEFT}UU]II{
DOWN}{06 LEFT}UUU]III{DOWN}{07 LE
LEFT}@@@*@@@{DOWN} 07 LEFT}JJJ]KK
K"
235 XP$=XP$+"{RED}{DOWN}(06 LEFT}JJ]KK{
DOWN}{04 LEFT}J]K"
240 S$="{HOME}{24 DOWN}"
250 Q$="{WHT}{40 RIGHT}"
260 XR$="{WHT} {DOWN}{04 LEFT} {
DOWN}{06 LEFT} {DOWN}{07
LEFT) * {DOWN}{07 LEFT} ~
"
265 XR$=XR$+"{DOWN}{06 LEFT} {DOWN}{04
LEFT) "
270 REM ---SET UP NEXT WAVE---
280 BG=0:NW=NW+1:IF NW>ll THEN 310
290 NB=NB+1.5:IF NW=l THEN 330
300 IF NW<6 THEN BT=BT-180
310 PRINT"{HOME}{02 DOWN}{REV}";TAB(15);NW
320 POKE FNS(1),32:FORJ=1 TO NB:POKEBP(J),
32:NEXT
325 FORJ=l TO 25:POKE BC(J),32:NEXT
330 BN=INT(NB):FORJ=1 TO NB:BS(J)=1:NEXT
340 FORJ=l TO NB
350 BT(J)=(.4+INT(61*RND(1))/100)*BT
360 B3(J)=BT(J)+.5*BT(J):B4(J)=B3(J)+
T (J)
370 NEXT
380 PX=19:PY=15:POKE FNS(1),90:POKEFNS(1)+
D,1
390 FORJ=l TO NB
400 BP(J)=FNP(1):IF PEEK(BP(J))<>32 THEN 4
00
410 POKE BP(J),87:POKEBP(J)+D,8:NEXT:NN=0
415 FORJ=l TO 25
416 BC(J)=FNP(1):IF PEEK(BC(J))<>32 THEN 4
16
417 IF PEEK(BC(J)+1)=87 THEN 416
419 POKEBC(J),86:POKEBC(J)+D,5:NEXT
420 GET R$:IF R$<>"" THEN 420
430 DR=0:TX=TI
440 REM ---GET COMMANDS---
450 R=(15-(PEEK(56321)AND15))*2
460 IFR<>0THENDR=LOG(R)/LOG(2)
470 IFR=0THEN490
480 REM ---MOVE TRUCK---
490 IF DR=0 THEN 600
500 POKE FNS(1),32:PX=PX+XM(DR):PY=PY+YM(D
R)
510 IF PX<0 THEN PX=39
520 IF PX>39 THEN PX=0
530 IF PY<4 THEN PY=24
540 IF PY>24 THEN PY=4
550 X=FNN(1)
560 IF X=32 THEN POKE FNS(1),90:POKEFNS(1)
+D,1:GOTO 600
570 IF X=42 OR X=86 THEN 960
580 GOTO 890
590 REM ---UPDATE BOMBS---
600 NN=NN+1:IF NN>INT(NB)THEN NN=1
610 IF BS(NN)=0 THEN 600
620 TG=TI-TX
630 IF TG>B4(NN) THEN N1=NN:GOTO 720
640 IF BS(NN)>2 THEN 690
650 IF TG>BT(NN) THEN BS(NN)=2
660 IF TG>B3(NN) THEN BS(NN)=3
670 IF BS(NN)=1 THEN 450
680 IF BS(NN)=2 THEN POKE BP(NN),215:POKEB
P(NN)+D,1:GOTO 450
690 IF BS(NN)=3 THEN POKE BP(NN),87:POKEBP
(NN)+D,1:BS(NN)=4:GOTO 450
700 IF BS(NN)=4 THEN POKE BP(NN),215:POKEB
P(NN)+D,1:BS(NN)=3:GOTO 450
710 REM ---BOMB EXPLODES---
720 TQ=TI:PD=0
725 X$="{OFF}"+LEFT$(S$,FNY(BP(N1))-2)+LEF
T$(Q$,FNX(BP(N1))-1)
730 BS(N1)=0:N2=0:PRINTX$;XP$;
740 FORJ=l TO NB:X=PEEK(BP(J)):IF BS(J)=0 ~
THEN 760
750 IF X<>87 AND X<>215 AND X<>218 THEN N2
=J
760 NEXT:IF FNN(1)<>90 AND FNN(1)<>218 THE
N PD=1
770 PRINTX$;XR$;:GR=129 :GOSUB2000
780 FORJ=1TONB:IF PEEK(BP(J))=32 AND BS(J)
<>0 THEN POKE BP(J),87-128*(BS(J)>1)
790 NEXT:BN=BN-1
800 IF PD=1 THEN 960
810 IF BN=0 THEN 840
820 IF N2=0 THEN TX=TX+(TI-TQ):GOTO 450
830 N1=N2:GOTO 725
840 PRINT"{HOME}{02 DOWN}{REV}";TAB(20);
850 FORJ=l TO 20:PRINT"{REV}COMPLETED{09
LEFT}";:FORK=1 TO 100:NEXT
860 PRINT"{REV} {09 LEFT)";:FORK=1
TO 100:NEXT:NEXT
870 SC=SC-10*(INT(NB)-BG):IF SC<0 THEN SC=0
880 PRINT"{04 LEFT}{03 UP} {10
LEFT}";SC:GOTO 280
885 REM ---BOMB GATHERED---
890 BG=BG+1:TQ=TI:POKE FNS(1),218
895 FORJ=l TO NB:IF PEEK(BP(J))=218 THEN A
J=BS(J):BS(J)=0
900 NEXT
910 IF AJ=4 THEN AJ=3
920 SC=SC+10*AJ:PRINT"{HOME}{REV}";TAB(16)
;SC
930 GR=33:GOSUB2000:BN=BN-1:IF BN=0 THEN 8
40
940 TX=TX+(TI-TQ):GOTO 450
950 REM ---PLAYER DESTROYED---
960 GR=129:GOSUB2000
961 TQ=TI:FORJ=1 TO 20:POKE FNS(1),42:FORK
=1 TO 25:NEXT:POKE FNS(1),170
970 FORK=1 TO 25:NEXT:NEXT:POKE FNS(1),32:
NL=NL-1
980 POKE 1153+NL,160:DR=0:PX=19:PY=15
990 IF NL=0 THEN 1045
1000 IF BN=0 THEN 840
1010 GET R$:IF R$<>"" THEN 1010
1020 FORJ=ITONB:IF PEEK(BP(J))=32 AND BS(J)
<>0 THEN POKE BP(J),87-128*(BS(J)>1)
1030 NEXT
1040 POKE FNS(1),90:TX=TX+(TI-TQ):GOTO 450
1045 IF SC>HS THEN HS=SC:PRINT"{HOME}{DOWN}
{REV}";TAB(19);HS
1050 FORJ=l TO 1500:NEXT:PRINT"{HOME}{WHT}{
03 DOWN}{REV}";TAB(20);"GAME OVER
{DOWN}{WHT}{09 LEFT}PLAY AGAIN?";
1060 PRINT"(Y/N){04 LEFT}";
1080 PRINT"{REV}Y/{OFF}N{03 LEFT}";
1081 FORJ=l TO 99:NEXT
1082 PRINT"{OFF}Y{REV}/N{03 LEFT}";
1083 FORJ=l TO 99:NEXT
1084 GET R$:IF R$="Y" THEN 1110
1090 IF R$<>"N" THEN 1080
1100 PRINT"{CLEAR}{WHT}LATER ON!":END
1110 GOSUB 1130:GOTO 150
1120 REM ---INSTRUCTIONS---
1130 PRINT"{CLEAR}{REV}{WHT}M I N E F I E L
D":POKE 53272,23
1140 PRINT"{WHT}DO YOU NEED INSTRUCTIONS (Y
/N)„ - -
1150 GET R$:IF R$="N" THEN 1410
1160 IF R$<>"Y" THEN 1150
1180 PRINT"{CLEAR}{WHT}{DOWN}THE OBJECT OF ~
THIS GAME IS TO PICK UP"
1190 PRINT"{WHT}AS MANY BOMBS AS YOU CAN BE
FORE THEY"
1200 PRINT"{WHT}EXPLODE. TO PICK UP A BOMB,
JUST RUN"
1210 PRINT"{WHT}OVER IT WITH YOUR TRUCK."
1220 PRINT"{WHT}BOMBS WILL EXPLODE AFTER A ~
SHORT TIME."
1230 PRINT"{WHT}IF A BOMB TURNS REVERSE-FIE
LD, BE CARE-"
1240 PRINT"{WHT)FUL WITH IT. IF IT STARTS T
O BLINK, IT"
1250 PRINT"{WHT}WILL VERY SHORTLY EXPLODE-W
ATCH OUTII"
1260 PRINT"{WHT}_BOMBS WILL CHAIN-REACT; ONE
BOMB CAUGHT"
1270 PRINT"{WHT}IN ANOTHER'S EXPLOSION WILL
ALSO BLOW"
1280 PRINT"{WHT}UP. IF YOU ARE CAUGHT IN A ~
BOMB'S "
1290 PRINT"{WHT}EXPLOSION, YOU WILL BE BLOW
N UP."
1300 PRINT"{WHT}ALSO, DO NOT RUN INTO BOMB ~
CRATERS (*)"
1310 PRINT"{WHT}OR MINES (X) OR YOU'LL BE T
OTALLED."
1320 PRINT"{WHT}THE CONTOLS ARE: 1 TO GO UP
1330 PRINT"{WHT} CTRL TO GO
LEFT"
1340 PRINT"{WHT} 2 TO GO RI
GHT"
1350 PRINT"{WHT} _ TO GO DO
WN"
1355 PRINT"{WHT}OR YOU CAN USE A JOYSTICK I
N PORT 1."
1360 PRINT"{WHT}YOUR TRUCK CANNOT STOP ONCE
YOU BEGIN"
1370 PRINT"{WHT}MOVING. IT CAN WRAP-AROUND ~
BOTH THE"
1380 PRINT"{WHT}THE TOP AND SIDES OF THE SC
REEN."
1390 PRINT"{DOWN}{WHT}P{WHT}RESS RETURN TO ~
CONTINUE";
1400 GET R$:IF R$<>CHR$(13) THEN 1400
1410 PRINT"{CLEAR}S{WHT}ELECT SKILL SETTING
(0-3)"
1420 GET R$:IF R$<"0" OR R$>"3" THEN 1420
1430 NL=4-VAL(R$):RETURN
1900 END
2000 REM SOUND OF EXPLOSION
2010 QW=54272
2020 FORS=QWTOQW+24:POKES,0:NEXT
2025 POKEQW+24,47
2030 POKEQW+5,64+7 :POKEQW+6,240
2050 POKEQW+4,GR :POKEQW+1,36:POKEQW,85
2060 FORT-1TO250:NEXT
2070 FORT=15TO0STEP-1 :POKEQW+24,INT(T):NEX
T
2080 RETURN
A mine explodes in the Commodore 64 version of "Minefield."
Program 4: Minefield -Apple Version
60 REM MINEFIELD FOR APPLE
90 GOSUB 2000
100 REM SETUP VARIABLES
105 NT = 3
110 DIM BO(23),XL%(23),MO(23)
125 H = 20:U = 12
130 HOME : GOSUB 600: REM HEADINGS
139 REM SET UP ARRAYS
140 FOR X = 6 TO 19:BP = INT ( RND (1
) * 25 + 5):BO(X) = BP: NEXT
150 FOR X = 6 TO 19
160 MP = INT ( RND (1) * 30 + 5):MO(X)
= MP: IF MO(X) = BO(X) THEN 160
165 NEXT
170 REM PRINT SCREEN
180 FOR X = 6 TO 19: VTAB (X): HTAB (B
O(X)): PRINT "O";: VTAB (X): HTAB
(MO(X)): PRINT "X";: NEXT
190 REM SET UP ARRAY FOR POSITION
200 FOR I = 0 TO 7:XL%(I) = 1024 + 128
* I:XL%(I + 8) = 1064 + 128 * I:X
L%(I + 16) = 1104 + 128 * I: NEXT
210 U = 12:H = 20:NB = 10
215 HTAB (H): VTAB (U): PRINT "+";
220 REM GET COMMANDS
225 TI = TI + 1: GOSUB 800
230 P = PEEK ( - 16384) - 128: IF P <
73 OR P > 77 THEN 230
235 B$ = CHR$ (P)
245 ODDU = U:OLDH = H
250 IF B$ = "I" THEN U = U - 1
260 IF B$ = CHR$ (3) THEN END
270 IF B$ = "M" THEN U = U + 1
280 IF B$ = "K" THEN H = H + 1
290 IF B$ = "J" THEN H = H - 1
300 IF H < 1 THEN H = 39
310 IF H > 39 THEN H = 1
320 IF U < 6 THEN U = 22
330 IF U > 22 THEN U = 6
333 REM PICK UP BOMBS
335 IF PEEK (XL%(U - 1) + H - 1) = 20
7 THEN POKE XL%(U - 1) + H - 1,42
:NB = NB - 1:SC = SC + 10:BO(U -1)=0
336 IF PEEK (XL%(U - 1) + H - 1) = 79
THEN POKE XL%(U - 1) + H - 1,42:
NB = NB - 1:SC = SC + 20:BO(U - 1)= 0
340 REM CHECK FOR COLLISION
345 IF NB < 0 THEN W = W + 1:TI = TI -
25: GOTO 130
350 K = PEEK (XL%(U - 1) + H - 1): IF
K = 207 OR K = 224 OR K = 160 OR K
= 32 OR K = 176 OR K = 42 OR K =
79 OR K = 238 THEN 360
355 VTAB (ODDU): HTAB (OLDH): PRINT "
";:NT = NT - 1: GOSUB 1000:W = W +
1: GOTO 130
360 REM UPDATE BOMBS
380 REM SCORE
390 VTAB (2): HTAB (6): PRINT W;: HTAB
(18): PRINT SC;:IF HS< SC THEN HS=SC
400 VTAB (3): HTAB (25): PRINT HS;: VTAB
(2): HTAB (40): PRINT NT;
410 IF NT < 1 THEN W = W + 1: GOTO 700
580 REM MOVE TRUCK
585 VTAB (ODDU): HTAB (OLDH): PRINT "
";: VTAB (U): HTAB (H): PRINT "+";
590 GOTO 220
600 HTAB (16): FLASH : PRINT "MINEFIEL
D": NORMAL : VTAB (2): PRINT "WAVE
";"SCORE ";"NUMBER OF
TRUCKS "
: VTAB (3): HTAB (13): PRINT "HIGH
SCORE";: RETURN
700 VTAB (4): HTAB (4): FLASH : PRINT
"PLAY AGAIN?";: NORMAL
710 VTAB (4): HTAB (17): PRINT "Y OR N";
730 GET A$: IF A$ = "Y" THEN SC = 0:NT
= 3:TI = 0:W = 0: GOTO 130
740 IF A$ = "N" THEN HOME : INVERSE :
PRINT "LATER ON": NORMAL : END
760 GOTO 700
800 IF TI > 100 THEN X = INT ( RND (1
) * 14 + 6): IF BO(X - 1) < > 0 AND
BO(X) < > 0 AND XL%(X - 1) > 6 THEN
POKE XL%(X - 1) + BO(X) - 1,79
810 IF TI > 300 AND BO(X - 1) < > 0 AND
BO(X) < > 0 THEN POKE XL%(X - 1)
+ BO(X),160: POKE XL%(X - 1) + BO
(X) - 1,188: POKE XL%(X - 1) + BO(
X) + 1,188
820 IF TI > 300 AND BO(X - 1) > 5 < 30
AND BO(X) < > 0 THEN POKE XL%(X
- 1) + BO(X) - 1,160: POKE XL%(X -
1) + BO(X) + 1,160: POKE XL%(X - 1
) + BO(X) + 2,188: POKE XL%(X - 1)
+ BO(X) - 2,188: POKE XL%(X - 1) +
BO(X) - 2,160: POKE XL%(X - 1) + B
O(X) + 2,160
825 IF TI > 325 THEN TI = 0: SOTO 130
830 RETURN
1000 REM EXPLOSION
1010 FOR G = 1 TO 3: POKE XL%(U - 1 -
G) + (H - 1 - G),239: POKE XL%(U -
1 + G) + (H - 1 - G),220: POKE XL%
(U - 1 - G) + (H - 1 + G),220: POKE
XL%(U - 1 + G) + (H - 1 + G),239: NEXT
1020 FOR G = 1 TO 3: POKE XL%(U - 1 -
G) + (H - 1 - G),224: POKE XL%(U -
1 + G) + (H - 1 - G),224: POKE XL%
(U - 1 - G) + (H - 1 + G),224: POKE
XL%(U - 1 + G) + (H - 1 + G),224: NEXT
1025 GOSUB 3000
1030 RETURN
2000 HOME : PRINT " THE OBJECT OF MINE
FIELD IS TO COLLECT AS MANY BOMBS
AS POSSIBLE BEFORE THEY EXPLODE.I
F THE BOMBS(O) FLASH THEN THEY WIL
L SOON EXPLODE. YOU GET THREE TRUC
KS(+) PER GAME.
2010 PRINT "POINTS ARE AWARDED AS FOLLOWS:
2020 PRINT "TEN POINTS FOR A NORMAL BOMB (O) "
2030 PRINT "TWENTY POINTS FOR A FLASHI
NG BOMB ": FLASH : PRINT "O": NORMAL
2040 PRINT "POINTS ARE DEDUCTED IF YOU
ARE EXPLODED."
2050 PRINT "USE THE I J K AND M KEYS T
O MOVE YOUR TRUCK"
2060 FOR T = 1 TO 15000: NEXT
2070 RETURN
3000 FOR SR = 1 TO 60:XF = PEEK ( - 1
6336): NEXT : RETURN
"Minefield," Apple version.