Dam Eaters


The object of this game is to prevent the dam-eating creatures from eating away the dam which is built up on the left-hand side of the screen by dropping shells on them from any of the three cannon at the top. The dam eaters enter randomly from the right of the screen and gradually chew away the bricks of the dam until finally they break through and you have lost the game. The game contains a number of other features which you will have to discover by experience.

    5  REM**DAMEATERS**BBC VERSION **CONVERTE
D I.THOMAS FROM ORIGINAL @ P.STANLEY
   10 DIMY(3),X(3)
   20 HS=0
   30 GOSUB730
   40 MODE5
   50 GOSUB640
   60 MODE2
   70 GOSUB840
   80 GOSUB690
   90 VDU23,1,0;0;0;0;
  100  I=1:ENDFL=0
  110 X(I)=X(I)-1:IFRND(1)>.8 GOSUB320
  120 COLOUR1:PRINTTAB(X(I),Y(I))CHR$227;CHR$
228" "
  130 Z=FNAT(X(I)-1,Y(I))
  140 IFZ<>32 GOSUB370
  145  IF ENDFL=1 THEN 530
  150  I=I+1:IF I<=N THEN 110
  160 IFB<>0 GOTO210
  170 Q=INKEY(0)-48
  180 *FX15
  190 IFB=0 ANDQ>0 ANDQ<4 G=Q*3+3:S1=Q:F=1:B=
1:SOUND1,-15,30,1
  200 IFB=0 GOTO100
  210 FLAG=0
  220  I=1
  230 PRINTTAB(G,F)" "
  240 F=F+1:IFF=29 FLAG=1
  250 Z=FNAT(G,F)
  260 IFZ<>32 GOTO430
  270 COLOUR2:PRINTTAB(G,F)"|":COLOUR1
  280  I=I+1:IF I=2 THEN 230
  290 IFFLAG=1 GOTO620
  300 IFN<3 C=C+1:IFC=130 N=N+1:C=0:PRINTTAB(
7,7)"Enemy"TAB(7,8)"reinforcement":FORI=1TO30
:SOUND1,-15,I,2:NEXT:PRINTTAB(7,7)SPC(5);TAB(
7,8)SPC(13)
  310 GOTO100
  320 PRINTTAB(X(I),Y(I))"   "
  330 Y(I)=Y(I)+1+2*(RND(1)>.5)
  340 IFY(I)<2 Y(I)=29
  350 IFY(I)>29 Y(I)=2
  360 RETURN
  370 PRINTTAB(X(I)-1,Y(I))CHR$229;CHR$230:SO
UND1,-15,5,3:FORO=0TO100:NEXT
  380 PRINTTAB(X(I)-1,Y(I))"   "
  390 Z=FNAT(X(I)-2,Y(I))
  400 IFZ=159 THEN ENDFL=1:RETURN
  410 Y(I)=RND(24)+2:X(I)=17
  420 RETURN
  430 PRINTTAB(G-1,F)CHR$229;CHR$230;CHR$229:
FORO=3 TO9 STEP3:SOUND1,-15,O,1:NEXT:FORO=0TO
100:NEXT:SOUND1,-15,25,1:PRINTTAB(G-1,F)"   "
  440 SC=INT(SC+S1*2+F/3):PRINTTAB(17,27);SC
  450 B=0
  460 FLAG=0
  470 FORI=1 TON
  480   IFF=Y(I) AND(G=X(I) OR G=X(I)+1) FLAG
=1
  490 NEXT
  500 IFFLAG=0 GOTO100
  510 Y(FLAG)=RND(24)+2:X(FLAG)=17
  520 GOTO100
  530 FORI=0TO200:NEXT:GCOL0,4
  540 FORI=0TO200:NEXT:GCOL0,4
  550 FORO=0 TO991 STEP4:PLOT77,640,O:NEXT
  560 COLOUR128:FORI=0TO2000:NEXT:CLS:*FX15
  570 PRINTTAB(0,4)"You scored ";SC" points"
  580 IFSC>HS HS=SC:PRINTTAB(2,6)"Well Done!"
TAB(2,8)"A new high-score"
  590 PRINTTAB(2,11)"Hi-score ";HS
  600 PRINTTAB(0,20)"Any key to play"
  610 X=GET:GOTO60
  620 COLOUR3:PRINTTAB(G,30)CHR$232;TAB(G,29)
" "
  630 B=0:GOTO100
  640 MODE7:PRINTTAB(6,0)"DAM EATERS"
  650 PRINT''"Can you prevent the dam from be
ing      broken by the dam eaters ?"
  660 PRINT''"Release bombs from any of the 3
 cannons above the dam with the keys 1-3."
  670 PRINT'"There are several features which
 you    will have to wait to see !"
  680 PRINT''''"Press any key to start.":X=GE
T:RETURN
  690 SC=0:B=0
  700 N=1:C=0
  710 FORI=1TO3:X(I)=17:Y(I)=RND(24)+2:NEXT
  720 RETURN
  730 VDU23,224,119,119,0,221,221,0,119,119
  740 VDU23,225,0,221,221,0,119,119,0,221
  750 VDU23,226,221,0,119,119,0,221,221,0
  760 VDU23,227,0,255,171,0,0,171,255,0
  770 VDU23,228,28,39,255,255,255,255,0,0
  780 VDU23,229,96,10,193,20,101,128,51,140
  790 VDU23,230,194,40,67,24,130,40,67,16
  800 VDU23,231,63,31,15,7,3,3,1,1
  810 VDU23,232,2,196,40,23,232,16,231,24
  820 VDU23,255,255,255,255,255,255,255,255,2
55
  830 RETURN
  840 COLOUR3:FORF=0 TO29 STEP3:PRINTTAB(2,F)
CHR$224;CHR$224;CHR$224;TAB(2,F+1)CHR$225;CHR
$225;CHR$225;TAB(2,F+2)CHR$226;CHR$226;CHR$22
6:NEXT
  850 COLOUR132:FORF=0TO30:PRINTTAB(0,F)"  ";
:NEXT
  860 PRINTTAB(0,30)SPC(20);
  870 COLOUR5:COLOUR128:PRINTTAB(6,0)CHR$231"
  "CHR$231"  "CHR$231
  880 RETURN
  890 DEFFNAT(X%,Y%)
  900 VDU31,X%,Y%
  910 A%=135:A%=USR&FFF4 AND&FFFF
  920 =A% DIV256