"Tank combat game" for Sharp PC-1500 or PC-1500A.
© Hebdogiciel (Shift editions). (*)
Author : F. E.
Published in "Hebdogiciel" #5 (Nov 1983).
BASIC program - 1880 bytes.
CLOAD "TANK"
RUN
Game: destroy tanks with grenades... If the tank shoots at you, you can hide in a pit made by a grenade.
Keys:
1 - left
3 - right
2 - throw grenade (hold key to throw further)
(*) This software is made available for documentation purpose only, since the PC-1500 is now an obsolete computer. This is not a commercial site. If you own a copyright on this program and do not want it to be available from this site, please inform me and I will remove it.
BASIC program.
1 REM <<<< TANK
>>>>
2 REM ///Hebdo. No 5///
3 GOTO 1000
4 DATA "606060","000000","746E74","503850"
5 DATA "60756A7C7E7C6A7560","6062794C5C4C796260","6060606878787E7E7E7A7A68"
6 DATA "1030303C3C3C343410"
12 DATA 8,0
13 DATA 8,4,0
14 DATA 8,4,4,0
15 DATA 8,4,2,4,0
16 DATA 8,4,2,2,4,0
17 DATA 8,4,2,1,2,4,0
18 DATA 8,4,2,1,1,2,4,0
19 DATA 8,4,2,1,1,1,2,4,0
30 "3"IF V>0THEN 90
40 FOR V=2TO 8
50 IF INKEY$ <>"2"THEN 70
60 NEXT V
70 RESTORE V+10
80 READ A,B,C,D,E,F,G,H,I:S=O
85 J=J-1:CURSOR 22:PRINT J
90 GOTO "2"
100 "5"Q=P+2,P=1
110 GCURSOR O:GPRINT @$(Q):BEEP 1,60,1
120 O=O-3:IF O<=0LET O=0
130 IF POINT O<96LET P=2
140 GOTO "2"
200 "6"Q=P+2,P=1
210 GCURSOR O:GPRINT @$(Q):BEEP 1,60,1
220 O=O+3:IF O>=117LET O=117
230 IF POINT O<96LET P=2
240 GOTO "2"
300 "1"FOR N=0TO 2
310 GCURSOR M:GPRINT B$(N)
320 BEEP U,U*100,20
330 NEXT N
340 RETURN
400 "4"IF R>=117OR O-R<=9THEN 910
420 M=X-O
430 IF P=1AND M>-2AND M<6THEN 910
600 IF W=1THEN 630
610 IF Z<RND 40THEN 690
620 W=1,X=R+11
630 Y=125AND POINT X:GCURSOR X:GPRINT Y
640 X=X+6:IF X>=117LET W=0:GOTO 690
650 Y=2OR POINT X:GCURSOR X:GPRINT Y:BEEP 1,20,10
690 IF V=0THEN 800
700 M=S-3,U=0:GOSUB "1":N=S-R
710 GCURSOR S:GPRINT T
720 S=S-3:IF S<3THEN 780
730 V=V-1:IF V=0THEN 760
740 T=@(V)OR POINT S
750 GCURSOR S:GPRINT T:BEEP 1,5,5:GOTO 800
760 M=S-3,U=1:GOSUB "1":N=S-R
770 IF N<=9AND N>=3THEN 900
780 IF J<=0THEN 910
790 V=0
800 N=VAL INKEY$ :ON NGOTO "5","3","6"
810 "2"GCURSOR O:GPRINT @$(P)
820 IF Z<RND 20THEN 850
830 IF Z>23AND V>0AND S-V*3>R+12AND RND Z>20THEN 850
840 R=R+3:BEEP 1,10,10
850 GCURSOR R:GPRINT T$(0)
860 GOTO "4"
900 M=R+3,U=2:GOSUB "1":R=0,V=0,Z=Z+1,K=K+1,J=J+3:CURSOR
22:PRINT J:GOTO "4"
910 BEEP 4,200,100
920 FOR M=0TO 119
930 GCURSOR M:GPRINT (127-POINT M)
940 NEXT M
950 IF L<=0THEN 1160
960 GCURSOR (117+6*L):GPRINT P$
970 L=L-1:GOTO 1110
1000 "S"CLEAR :RESTORE :DIM T$(0)*24,B$(3)*18
1010 READ C$,D$,A$,B$,B$(0),B$(1),T$(0),B$(3)
1020 CLS :B$(2)=C$+D$+C$,Z=1:WAIT 0
1030 FOR M=1TO 16
1040 CURSOR 3
1050 PRINT (LEFT$ ("TANK COMBAT GAME",M))
1060 BEEP 1,10,40
1070 NEXT M
1080 WAIT 100:PRINT
1100 K=0,L=2,J=0
1110 L$=B$,K$=B$:IF L<=1LET K$=D$:IF L=0LET L$=D$
1111 WAIT 0:GCURSOR 120:GPRINT D$+L$+D$+K$
1115 J=J+5:USING "*###":CURSOR 22:PRINT J
1120 FOR M=0TO 117STEP 3
1130 GCURSOR M:GPRINT C$:BEEP 1,1,20
1140 NEXT M
1150 M=0,V=0,R=0,O=117,P=1,W=0,X=0:RANDOM :GOTO "4"
1160 CLS :BEEP 1,50,900:CURSOR 2:PRINT " GAME OVER":WAIT
100:PRINT
1170 WAIT 0:CURSOR 18:GPRINT B$(3)
1180 FOR M=0TO K
1190 BEEP 1,50,100:CURSOR 13
1200 PRINT M
1210 NEXT M
1220 WAIT :PRINT :END