Hebdogiciel n°82

1 ! ************************************
2 ! *                                  *
3 ! *           LA CHENILLE            *
4 ! *      PAR
J.R HERPELDINGER *
5 ! *                                  *
6 ! *
***********************************
13 CLS "GBB"
14 LOCATE (7,10):CALL COLOR("0CHL")
15 PRINT "LLAA  CCHHEENNIILLLLEE"
16 LOCATE (8,10):CALL COLOR("0bHL")
17 PRINT "LLAA  CCHHEENNIILLLLEE"
18 LOCATE (13,4):CALL COLOR("0WB")
19 PRINT "COPYRIGHT HERPELDINGER J-ROCH 1984"
20 LOCATE (21,11):CALL COLOR("0Bb")
21 PRINT " PRESSEZ UNE TOUCHE"
22 A$=KEY$
23 REM _________________________________
24 REM !REDEFINITION DES CARACTERES
25 REM _________________________________
26 CALL CHAR(97,"7A7A7A7A7A7A7A7A7A7A")
27 CALL CHAR(98,"0000FFFFFFFF00FF0000")
28 CALL CHAR(99,"00001F3F7F7F787B7A7A")
29 CALL CHAR(100,"0000F8FCFEFE06F27A7A")
30 CALL CHAR(101,"7A7A7B7B7B793C1F0000")
31 CALL CHAR(102,"7A7AFAFAF2E60CF80000")
32 CALL CHAR(103,"0000FFFFFFFF00FA7A7A")
33 CALL CHAR(104,"7A7AFBFBFBFB00FF0000")
34 CALL CHAR(105,"7A7AFAFAFAFA02FA7A7A")
35 CALL CHAR(106,"7A7A7B7B7B7B787B7A7A")
36 CALL CHAR(107,"0000183C7E7A7A7A7A7A")
37 CALL CHAR(108,"7A7A7A7A7A7E3C180000")
38 CALL CHAR(109,"00001F3F7F7F301F0000")
39 CALL CHAR(110,"0000F8FCFEFE06F80000")
40 CALL CHAR(111,"0000183C7E7E3C180000")
41 CALL CHAR(112,"00001E1A1E1C5A7A0000")
42 CALL CHAR(114,"7EC399A5A1A1A599C37E")
43 CALL CHAR(113,"3C3C66DBBDBDDB663C3C")
44 CALL CHAR(121,"00187ECFFF3FFF7E1800")
45 CALL CHAR(119,"00187EF3FFFCFF7E1800")
46 CALL CHAR(118,"00002C6E7AFBFF7E7E3C")
47 CALL CHAR(120,"3C7E7EFFDF5E76340000")
48 !____________________________________
49 !          INITIALISATIONS
50 !____________________________________
51 G=131:D=129
52 B=130:H=128
53 DIM X(500)
54 DIM Y(500)
55 DIM TA1$(20,21)
56 T=1:TA=1
57 S=3
58 M=1
59 LS=1:MS=30000
60 !____________________________________
61 !         AFFICHAGE SERPENT
62 !____________________________________
63 CLS "GBB":GOSUB 153:GOTO 148
64 JR=0:ON T GOSUB 228,258,285,312
65 X1=19:MUL=3000:Y1=13:CALL TABL(TA):CALL VIE(S):CALL BONUS(MUL)
66 CALL COLOR("1RB")
67 FOR F=1 TO 5
68 X(F+100)=19:Y(F+100)=F+8
69 LOCATE (X(F+100)+1,Y(F+100)+18):IF F=5 THEN PRINT CHR$(D-10) ELSE PRINT "q"
70 NEXT F
71 DD=105:FF=101:A=D:X0=X1:Y0=Y1
72 !____________________________________
73 !             JEU
74 !____________________________________
75 C=A
76 CALL KEY1(F,E):IF F>=128 AND F<=131 THEN A=F
77 IF ABS(C-A)=2 THEN A=C
78 X1=X1-(A=B)+(A=H)
79 Y1=Y1-(A=D)+(A=G)
80 IF TA1$(X1,Y1)=" " THEN 100
81 IF TA1$(X1,Y1)="p" THEN 121
82 IF TA1$(X1,Y1)="q" THEN 111
83 X1=X0:Y1=Y0
84 ON (C-127)GOTO 85,87,89,91
85 IF TA1$(X0-1,Y0)=" "OR TA1$(X0-1,Y0)="p" THEN A=C:GOTO 77
86 GOTO 96
87 IF TA1$(X0,Y0+1)=" "OR TA1$(X0,Y0+1)="p" THEN A=C:GOTO 77
88 GOTO 92
89 IF TA1$(X0+1,Y0)=" "OR TA1$(X0+1,Y0)="p" THEN A=C:GOTO 77
90 GOTO 96
91 IF TA1$(X0,Y0-1)=" "OR TA1$(X0,Y0-1)="p" THEN A=C:GOTO 77
92 IF TA1$(X0-1,Y0)=" "OR TA1$(X0-1,Y0)="p" THEN A=H:GOTO 77
93 IF TA1$(X0-1,Y0)="q" THEN 111
94 IF TA1$(X0+1,Y0)=" "OR TA1$(X0+1,Y0)="p" THEN A=B:GOTO 77
95 IF TA1$(X0+1,Y0)="q" THEN 111
96 IF TA1$(X0,Y0+1)=" "OR TA1$(X0,Y0+1)="p" THEN A=D:GOTO 77
97 IF TA1$(X0,Y0+1)="q" THEN 111
98 IF TA1$(X0,Y0-1)=" "OR TA1$(X0,Y0-1)="p" THEN A=G:GOTO 77
99 IF TA1$(X0,Y0-1)="q" THEN 111
100 DD=DD+1:FF=FF+1
101 X(DD),X0=X1:Y(DD),Y0=Y1
102 CALL COLOR("1bB"):LOCATE (X(DD-1)+1,Y(DD-1)+18):PRINT "q"
103 TA1$(X(DD),Y(DD))="q"
104 LOCATE (X(DD)+1,Y(DD)+18)
105 PRINT CHR$(A-10)
106 CALL COLOR("0BB"):LOCATE (X(FF-1)+1,Y(FF-1)+18):PRINT " "
107 TA1$(X(FF-1),Y(FF-1))=" "
108 MUL=MUL-10:CALL BONUS(MUL)
109 IF MUL<=0 THEN 111
110 GOTO 75
111 !___________________________________
112 !       EFFACEMENT SERPENT
113 !___________________________________
114 CALL COLOR("0BB"):FOR I=FF TO DD
115 LOCATE (X(I)+1,Y(I)+18):PRINT " "
116 TA1$(X(I),Y(I))=" "
117 NEXT I
118 S=S-1:CALL VIE(S)
119 IF S<=0 THEN 191
120 GOTO 65
121 !___________________________________
122 !        RENCONTRE JR
123 !___________________________________
124 TA1$(X1,Y1)=" "
125 FF=FF-LS:PT=PT+10
126 JR=JR+1
127 CALL SCORE(PT)
128 IF JR=NN THEN TA=TA+1:GOTO 134
129 GOTO 100
130 !___________________________________
131 !        PLUS DE BONUS
132 !___________________________________
133 GOTO 111
134 !___________________________________
135 !           BONUS
136 !___________________________________
137 LOCATE (X1+1,Y1+18):CALL COLOR("0BB"):PRINT " "
138 FOR I=FF TO DD
139 LOCATE (X(I)+1,Y(I)+18):PRINT " ":NEXT
140 CH=((MUL/100)-INT(MUL/100))*100
141 IF CH=0 THEN 145
142 FOR I=CH TO 0 STEP -10
143 CALL BONUS(I+(MUL-CH)):PT=PT+(10*M):CALL SCORE(PT)
144 NEXT
145 FOR I=(MUL-CH)TO 0 STEP -100
146 CALL BONUS(I):PT=PT+(100*M):CALL SCORE(PT)
147 NEXT
148 EFF$=RPT$(" ",21):CALL COLOR("0MM")
149 FOR I=2 TO 21
150 LOCATE (I,19):PRINT EFF$
151 NEXT
152 GOTO 64
153 !___________________________________
154 !             ECRAN
155 !___________________________________
156 FON$=RPT$(" ",16):CALL COLOR("0BM")
157 FOR I=2 TO 21
158 LOCATE (I,2):PRINT FON$
159 NEXT
160 CALL COLOR("1Bb")
161 LOCATE (19,3):PRINT "r"
162 CALL COLOR("1Bb")
163 LOCATE (19,4):PRINT " HER"
164 LOCATE (20,3):PRINT "     "
165 CALL COLOR("0BW")
166 LOCATE (19,8):PRINT "PELD"
167 LOCATE (20,8):PRINT "1985"
168 CALL COLOR("0BR")
169 LOCATE (19,12):PRINT "INGER"
170 LOCATE (20,12):PRINT "     "
171 LOCATE (4,3):CALL COLOR("0CMH")
172 PRINT "SCORE:"
173 LOCATE (5,3):CALL COLOR("0bMH")
174 PRINT "SCORE:"
175 CALL SCORE(0)
176 LOCATE (8,5):CALL COLOR("0CMH")
177 PRINT "BONUS:"
178 LOCATE (9,5):CALL COLOR("0bMH")
179 PRINT "BONUS:"
180 CALL BONUS(3000)
181 LOCATE (12,4):CALL COLOR("0CM")
182 PRINT "TABLEAU:":CALL TABL(TA)
183 LOCATE (14,4):CALL COLOR("0bM")
184 PRINT "Nb VIE :":CALL VIE(S)
185 LOCATE (16,3):CALL COLOR("0RM")
186 PRINT "MEILLEUR SCORE"
187 MS=30000:LOCATE (17,6):CALL COLOR("0RM")
188 PRINT USING"######",MS
189 RETURN
190 STOP
191 !___________________________________
192 !   PLUS DE SERPENT:FIN DE PARTIE
193 !___________________________________
194 IF MS<PT THEN MS=PT
195 LOCATE (17,6):CALL COLOR("0RM")
196 PRINT USING"######",MS
197 MES$="VOULEZ-VOUS FAIRE UNE AUTRE PARTIE ?((O/N)####"
198 LO=LEN(MES$)
199 FOR I=1 TO LO
200 CALL KEY1(F,E)
201 IF F=79 THEN 211
202 IF F=78 THEN CLS "bbb":END
203 IF LEN(LO$)<=20 THEN 206
204 PAUSE .1
205 LO$=SEG$(LO$,2,20)
206 LO$=LO$&SEG$(MES$,I,1)
207 LOCATE (2,19):CALL COLOR("0bB")
208 PRINT LO$
209 NEXT I
210 GOTO 199
211 IF PT>MS THEN MS=PT
212 LS=1:M=1:T=1:S=3:PT=0:CALL SCORE(0):GOTO 148
213 !-----------------------------------
214 FOR I=1 TO 20
215 READ Z$
216 LOCATE (I+1,19):CALL COLOR(COUL$)
217 PRINT Z$
218 FOR N=1 TO 21
219 TA1$(I,N)=SEG$(Z$,N,1)
220 NEXT N
221 NEXT I
222 FOR N=1 TO NN
223 READ X1,Y1
224 LOCATE (X1+1,Y1+18):CALL COLOR(JR$)
225 PRINT CHR$(112)
226 NEXT N
227 RETURN
228 !-----------------------------------
229 !          TABLEAU 1
230 !-----------------------------------
231 DATA "cbbbbbbbbbbbbbbbbbbbd"
232 DATA "a                   a"
233 DATA "a k cdpcbdpcbdpcd k a"
234 DATA "a lpef eda acf efpl a"
235 DATA "a    p  aa aa  p    a"
236 DATA "a mbbbn ef ef mbbbn a"
237 DATA "a                   a"
238 DATA "jbbbbbn mbbbn mbbbbbi"
239 DATA "a                   a"
240 DATA "a mbbbbbbd cbbbbbbn a"
241 DATA "a       pa ap       a"
242 DATA "a k mbbd a a cbbn k a"
243 DATA "a a   pa l l ap   a a"
244 DATA "a a mn l     l mn a a"
245 DATA "a a      k k      a a"
246 DATA "apebbbbn a a mbbbbfpa"
247 DATA "a  p     a a     p  a"
248 DATA "apmbbbbbbf ebbbbbbnpa"
249 DATA "a                   a"
250 DATA "ebbbbbbbbbbbbbbbbbbbf"
251 DATA 4,4,5,6,3,7,3,11,3,15,5,16,4,18
252 DATA 11,9,11,13,13,7,13,15,16,2,16,20,17,4,17,18,18,2,18,20
253 T=2:NN=17:RESTORE 231:COUL$="1RB":JR$="1YBF"
254 IF TA<=1 THEN 257
255 M=M+1:LS=LS+1
256 S=S+1:CALL VIE(S)
257 GOTO 213
258 !-----------------------------------
259 !          TABLEAU 2
260 !-----------------------------------
261 DATA "cbbbbbbbbbbbbbbbbbbbd"
262 DATA "a                   a"
263 DATA "a cn k k kpk k k md a"
264 DATA "a a pa a a a a ap a a"
265 DATA "a a mf a a a a en a a"
266 DATA "a a   pa a a ap   a a"
267 DATA "a a mbbf a a ebbn a a"
268 DATA "a a     pa ap     a a"
269 DATA "a l mbbbbf ebbbbn l a"
270 DATA "a p       p       p a"
271 DATA "a k mbbbbd cbbbbn k a"
272 DATA "a a     pa ap     a a"
273 DATA "a a mbbd a a cbbn a a"
274 DATA "a a   pa a a ap   a a"
275 DATA "a a md a a a a cn a a"
276 DATA "a a pa a a a a ap a a"
277 DATA "a jd a a a a a a ci a"
278 DATA "a ef l l lpl l l ef a"
279 DATA "a                   a"
280 DATA "ebbbbbbbbbbbbbbbbbbbf"
281 DATA 4,5,6,7,8,9,10,11,12,13,14,15,16,17
282 DATA 4,17,6,15,8,13,12,9,14,7,16,5
283 DATA 10,3,10,19,3,11,18,11
284 T=3:NN=17:RESTORE 261:COUL$="1GB":JR$="1bBF":GOTO 213
285 !-----------------------------------
286 !          TABLEAU 3
287 !-----------------------------------
288 DATA "cbbbbbbbbbbbbbbbbbbbd"
289 DATA "ap                 pa"
290 DATA "a o o o o o o o o o a"
291 DATA "a    p         p    a"
292 DATA "a o o o k o k o o o a"
293 DATA "a      pa   ap      a"
294 DATA "a o k k a o a k k o a"
295 DATA "a   l l lp pl l l   a"
296 DATA "a k  p    k    p  k a"
297 DATA "a apk k k a k k kpa a"
298 DATA "a a l l l a l l l a a"
299 DATA "a l               l a"
300 DATA "a   k k kp pk k k   a"
301 DATA "a o l l a o a l l o a"
302 DATA "a      pa   ap      a"
303 DATA "a o o o l o l o o o a"
304 DATA "a    p         p    a"
305 DATA "a o o o o o o o o o a"
306 DATA "ap                 pa"
307 DATA "ebbbbbbbbbbbbbbbbbbbf"
308 DATA 2,2,4,6,6,8,8,10,8,12,6,14,4,16,2,20
309 DATA 19,2,17,6,15,8,13,10,13,12,15,14,17,16,19,20
310 DATA 10,4,9,6,9,16,10,18
311 T=4:NN=20:RESTORE 288:COUL$="1YB":JR$="1MBF":GOTO 213
312 !-----------------------------------
313 !          TABLEAU 4
314 !-----------------------------------
315 DATA "cbbbbbbbbbbbbbbbbbbbd"
316 DATA "ap                 pa"
317 DATA "a mbn mbn k mbn mbn a"
318 DATA "a   p    pap    p   a"
319 DATA "a k mbn mbhbn mbn k a"
320 DATA "a a  p         p  a a"
321 DATA "a ebn mbbbbbbbn mbf a"
322 DATA "a      p     p      a"
323 DATA "jbbbbbbbbn mbbbbbbbbi"
324 DATA "a  p             p  a"
325 DATA "a k mbbnpk kpmbbn k a"
326 DATA "a a      a a      a a"
327 DATA "a a k cd a a cd k a a"
328 DATA "a a lpef a a efpl a a"
329 DATA "a a      a a      a a"
330 DATA "apl mbbnpl lpmbbn lpa"
331 DATA "a                   a"
332 DATA "a mbbbbbbbbbbbbbbbn a"
333 DATA "a                   a"
334 DATA "ebbbbbbbbbbbbbbbbbbbf"
335 DATA 2,2,2,20,4,5,4,10,4,12,4,17,6,6,6,16
336 DATA 8,8,8,14,10,4,10,18,11,9,11,13
337 DATA 14,6,14,16,16,2,16,9,16,13,16,20
338 T=1:NN=20:RESTORE 315:COUL$="1WB":JR$="1MBF"
339 GOTO 213
340 !-----------------------------------
341 !         SOUS-PROGRAMMES
342 !-----------------------------------
343 SUB SCORE(SC)
344 CALL COLOR("0CMH")
345 LOCATE (4,10):PRINT USING"######",SC
346 CALL COLOR("0bMH")
347 LOCATE (5,10):PRINT USING"######",SC
348 SUBEND
349 SUB BONUS(BS)
350 C1$="0CMH"
351 C2$="0bMH"
352 IF BS<=300 THEN C1$="0RMH":C2$="0RMH"
353 CALL COLOR(C1$):LOCATE (8,11):PRINT USING"####",BS
354 CALL COLOR(C2$):LOCATE (9,11):PRINT USING"####",BS
355 SUBEND
356 SUB VIE(VI)
357 LOCATE (14,12):CALL COLOR("0bM")
358 PRINT USING"###",VI
359 SUBEND
360 SUB TABL(TA)
361 LOCATE (12,12):CALL COLOR("0CM")
362 PRINT USING"###",TA
363 SUBEND


Ce listing est uniquement proposé pour un usage privé.
Sans accord écrit préalable, vous n'êtes pas autorisé à le distribuer, le transmettre ou le rediffuser.