home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dimension 64 15
/
Dimension_64_Nr.15_19xx_-_de_Side_B.d64
/
kniffel
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
10KB
|
323 lines
10 ifz=0thenz=1:poke53265,0:load"k.char",8,1
11 ifz=1thenz=2:load"k.sprites",8,1
12 clr:open2,8,8,"k.scores,s,r"
13 fori=1to5
14 input#2,na$(i)
15 input#2,pu$(i)
16 next:close2:poke53248+27,0
17 dim zv$(18):dimz(18):dimy(18):dims(18):dimq(18):pa=17400
18 fora=0to7:poke17400+a,30:next
19 poke56,63:v=53248:pokev+24,15:poke648,64:poke56576,2
20 v=53248:s=54272:pokev+32,0:pokev+33,0:print"[147]":pokev+21,255:pokev+28,0
21 fora=0to6:pokev+39+a,1:next:pokes+24,15:pokev+22,24:g=1:pokev+17,0
22 pokev+00,109:pokev+01,140:pokev+34,10:pokev+35,2
23 b=-20:fora=0to12step2:b=b+20:pokev+a,117+b:next
24 fora=1to13step2:pokev+a,140:next:pokepa,16:pokepa+1,17:pokepa+2,18
25 pokepa+3,19:pokepa+4,19:pokepa+5,20:pokepa+6,21 :pokepa+7,22
26 print"[155][\\\\\\\\\\\\\\\\\\\\\\\\\\\\]"
27 fora=0to19:print"^____________________________!":next
28 print"#$$$$$$$$$$$$$$$$$$$$$$$$$$$$%"
29 print"[158] star software "
30 print" star software[146] "
31 print" presents "
32 print"[159] presents [146]"
33 print" written by "
34 print" written by[146] "
35 print"[159] werner w and frank k "
36 print"[156] werner w and frank k[146] ":pokepa+7,30:pokev+17,27:g=1
37 geta$:ifa$=" "then50
38 b=int(rnd(1)*255):pokev+14,b:pokev+15,b:pokepa+7,28:pokev+46,1
39 fora=0to99:next:pokepa+7,29:fora=0to99:next:pokepa+7,28:forb=0to99:next
40 pokepa+7,30:fora=0to99:next
41 forh=0to6:pokev+39+h,1:next
42 forh=0to6:pokev+39+h,15:next
43 forh=0to6:pokev+39+h,12:next
44 forh=0to6:pokev+39+h,0:next
45 forh=0to6:pokev+39+h,12:next
46 forh=0to6:pokev+39+h,15:next
47 forh=0to6:pokev+39+h,1:next
48 forh=0to6:pokev+39+h,0:next
49 goto 37
50 pokes+5,15:pokes+12,15:pokes+19,15:pokes+6,247:pokes+3,9:pokes+10,9
51 pokes+20,247:pokes+13,247:pokes+4,17:pokes+11,17:pokes+18,17
52 fora=140to255step1:forb=1to13step2:pokev+b,a:nextb:pokes+8,a:pokes+6,a:nexta
53 fora=0to23:pokes+a,0:next:pokes+6,255:pokes+4,129:pokes+13,255
54 pokes+11,129:pokes+1,0:pokes+5,0:pokes+24,15:pokes+1,1:pokes+5,11:pokes+6,0
55 fori=1to249:next:pokes+12,9:pokes+13,0:pokes+19,10:pokes+18,129
56 fora=0to99:next
57 fora=0to23:pokes+a,0:next:pokev+21,0:poke198,0
58 print"[147][155] [\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\]"
59 print" ^ top five[155] !"
60 print" ^ [158]top[146] five[146][155] !"
61 print"[155] #$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%"
62 print"[155] [\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\]"
63 fora=0to15:print" ^ !":next
64 print"[155] #$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%"
65 print"[159]1[157][156]1"
66 print"[159]2[157][156]2"
67 print"[159]3[157][156]3"
68 print"[159]4[157][156]4"
69 print"[159]5[157][156]5"
70 print""
71 fori=1to5:print"[156]"na$(i)
72 print"[159]"na$(i):forc=0to169:nextc,i
73 print""
74 fori=1to5:print"[156]"pu$(i)
75 print"[159]"pu$(i):forc=1to169:next c,i
76 geta$:ifa$=" "then81
77 b=int(rnd(1)*255):pokev+14,b:pokev+15,b:pokepa+7,28:pokev+46,1:pokev+21,255
78 fora=0to99:next:pokepa+7,29:fora=0to99:next:pokepa+7,28:forb=0to99:next
79 pokepa+7,30:fora=0to99:next
80 goto 76
81 rem
82 print"[147]":pokev+17,0:pokev+21,127:fora=0to6:pokev+39+a,1:next
83 fora=1to13step2:pokev+a,50:next
84 b=-20:fora=0to12step2:b=b+20:pokev+a,109+b:nexta:pokev+17,27
85 print"[147]":ch=0:b$=""
86 print"[155][\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\]";
87 print"^!";
88 print"^!";
89 print"#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%"
90 ch=0:b$="":goto96
91 poke198,0:wait198,1:geta$:ifa$=chr$(13)andlen(b$)>0then100
92 ifa$=chr$(20)andlen(b$)>0thenb$=left$(b$,len(b$)-1):goto96
93 ifa$=" "thengoto95
94 ifa$<"a"ora$>"z"then91
95 b$=b$+a$
96 print"[159]name ";left$(b$+" ",14)
97 print"[156]name ";left$(b$+" ",14)
98 iflen(b$)>13then91
99 goto91
100 rem
101 rem
102 print"[147]":pokev+17,0:pokev+21,31:fora=0to5:pokev+39+a,0:next:pokev+16,24
103 fora=1to9step2:pokev+a,50:next:pokev+8,43:gosub 200:x=0
104 pokev,211:pokev+2,233:pokev+4,255:pokev+6,21:fora=0to4:pokev+39+a,7:next
105 fora=0to4:b=int(rnd(a)*6):pokepa+a,22+b:next:pokev+17,27
106 print"[159]1 2 3 4 5"
107 print"[156]1 2 3 4 5"
108 poke198,0:x=0:sw=sw+1:ifsw>13thengoto285
109 geta$:ifa$=""then109
110 ifa$="1"thena=0:w(0)=1:goto118
111 ifa$="2"thena=1:w(1)=1:goto118
112 ifa$="3"thena=2:w(2)=1:goto118
113 ifa$="4"thena=3:w(3)=1:goto118
114 ifa$="5"thena=4:w(4)=1:goto118
115 ifa$="e"then120
116 ifa$="d"thenfora=0to4:pokev+39+a,7:w(a)=0:next a
117 goto109
118 pokev+39+a,2
119 goto109
120 fori=0to4:ifw(i)=1thenb=int(6*rnd(1)):poke17400+i,22+b:w(i)=0
121 fora=0to4:pokev+39+a,7:nexta,i
122 x=x+1:ifx=2then goto228
123 goto109
124 rem 1'er
125 ifz(1)<>0thenreturn
126 forp=1to5:t(p)=0:ifpeek(pa-1+p)=22thent(p)=1
127 next:z(1)=t(1)+t(2)+t(3)+t(4)+t(5):q(1)=1
128 ifz(1)=0thenq(1)=2
129 return
130 rem 2'er
131 ifz(2)<>0thenreturn
132 forp=1to5:t(p)=0:ifpeek(pa-1+p)=23thent(p)=2
133 next:z(2)=t(1)+t(2)+t(3)+t(4)+t(5):q(2)=1
134 ifz(2)=0thenq(2)=2
135 return
136 rem 3'er
137 ifz(3)<>0thenreturn
138 forp=1to5:t(p)=0:ifpeek(pa-1+p)=24thent(p)=3
139 next:z(3)=t(1)+t(2)+t(3)+t(4)+t(5):q(3)=1
140 ifz(3)=0thenq(3)=2
141 return
142 rem 4'er
143 ifz(4)<>0thenreturn
144 forp=1to5:t(p)=0:ifpeek(pa-1+p)=25thent(p)=4
145 next:z(4)=t(1)+t(2)+t(3)+t(4)+t(5):q(4)=1
146 ifz(4)=0thenq(4)=2
147 return
148 rem 5'er
149 ifz(5)<>0thenreturn
150 forp=1to5:t(p)=0:ifpeek(pa-1+p)=26thent(p)=5
151 next:z(5)=t(1)+t(2)+t(3)+t(4)+t(5):q(5)=1
152 ifz(5)=0thenq(5)=2
153 return
154 rem 6'er
155 ifz(6)<>0thenreturn
156 forp=1to5:t(p)=0:ifpeek(pa-1+p)=27thent(p)=6
157 next:z(6)=t(1)+t(2)+t(3)+t(4)+t(5):q(6)=1
158 ifz(6)=0thenq(6)=2
159 return
160 u=0:ifz(7)<>0then228
161 gosub277:fori=1to5:s(i)=s(i)-21:next
162 ifs(1)=s(2)ands(1)=s(3)ors(3)=s(4)ands(3)=s(5)ors(2)=s(3)ands(2)=s(4)thenu=1
163 ifu=1thenfori=1to5:z(7)=z(7)+s(i):nexti
164 ifz(7)=0thenq(7)=2
165 return
166 u=0:ifz(8)<>0then228
167 gosub277:fori=1to5:s(i)=s(i)-21:next
168 ifs(1)=s(2)ands(1)=s(3)ands(1)=s(4)ors(2)=s(3)ands(2)=s(4)ands(2)=s(5)thenu=1
169 ifu=1thenfori=1to5:z(8)=z(8)+s(i):nexti
170 ifz(8)=0thenq(8)=2
171 return
172 u=0:ifz(9)<>0then228
173 gosub277
174 ifs(1)=s(2)ands(1)=s(3)ands(4)=s(5)ors(1)=s(2)ands(3)=s(4)ands(4)=s(5)thenu=1
175 ifu=1thenz(9)=25
176 ifz(9)=0thenq(9)=2
177 return
178 u=0:ifz(10)<>0then228
179 gosub277
180 goto311
181 rem
182 ifz(10)=0thenq(10)=2
183 return
184 u=0:ifz(11)<>0thengoto228
185 gosub277
186 ifs(1)<s(2)ands(2)<s(3)ands(3)<s(4)ands(4)<s(5)thenu=1
187 ifu=1thenz(11)=40
188 ifz(11)=0thenq(11)=2
189 return
190 u=0:ab=50:ifz(12)>=50thenab=100
191 xa=pa-1:forp=1to5:t(p)=0:t(p)=peek(xa+p)-21
192 next:ift(1)=t(2)andt(2)=t(3)andt(3)=t(4)andt(4)=t(5)thenu=1
193 ifu=1thenz(12)=z(12)+ab
194 ifu=0andz(12)=0thenq(12)=2
195 return
196 u=0:ifz(13)<>0thengoto228
197 xa=pa-1:forp=1to5:z(13)=z(13)+peek(xa+p)-21:next
198 ifz(13)=0thenq(13)=2
199 return
200 print"[155][\\\\\\\\\\\\\\\\\\\]"
201 forxy=1to19:print"^!":nextxy:gosub256
202 print"#$$$$$$$$$$$$$$$$$$$%"
203 print"[220] [159][220] [197][210][156] [156] =[156] ";zv$(1)
204 print"[158][221] [156][221] [197][210][159] [159]= [159]";zv$(2)
205 print"[255][159] [255] [197][210] [156]= ";zv$(3)
206 print"[158][223] [156][223] [197][210] [159]= [159]";zv$(4)
207 print"[160][159] [160] [197][210] [156]= [156]";zv$(5)
208 print"[158][161][156] [161] [197][210] [159] = [159]";zv$(6)
209 print"[159] [199][197][211][193][205][212] [156] = [156]";zv$(14)
210 print"[156] [194][207][206][213][211] [159] = [159]";zv$(15)
211 print"[159] [199][197][211][193][205][212] [207]. [156] = [156]";zv$(16)
212 print"[162] [156][196][210][197][201][197][210][208]. [159] = [159]";zv$(7)
213 print"[158][163] [159][214][201][197][210][197][210][208]. [156] = [156]";zv$(8)
214 print"[164] [156][198][213][204][204] [200][207][213][211][197][159] = [159]";zv$(9)
215 print"[158][220][219] [159][203].[211][212][210][193][211][211][197] [156] = [156]";zv$(10)
216 print"[220][220][156] [199].[211][212][210][193][211][211][197] [159] = [159]";zv$(11)
217 print"[158][220][221][159] [203][206][201][198][198][197][204] [156] = [156]";zv$(12)
218 print"[220][255] [156][195][200][193][206][195][197] [159] = [159]";zv$(13)
219 print"[159] [199][197][211][193][205][212] [213]. [156]= ";zv$(17)
220 print"[156] [199][197][211][193][205][212] [207]. [159]= [158]";zv$(16)
221 print"[159] [197][206][196][211][213][205][205][197] [156]= ";zv$(18)
222 print"[156][196] = [218][213][210][213][197][195][203]"
223 print"[159][197] = [206][193][197][195][200][211][212][197][210] [215][213][210][198]"
224 print"[156][210][207][212][197] [215][213][197][210][198][197][204]"
225 print"[159][197][210][200][193][204][212][197][206] [206][197][213][197][206]"
226 print"[156][218][193][200][204][197][206][215][197][210][212]."
227 return
228 print"[159][201][206] [215][197][204][195][200][197][211]":c=0:a$="":h$=""
229 print"[156][203][193][197][211][212][195][200][197][206]":c$=""
230 print"[159][197][201][206][212][210][193][199][197][206] "
231 print"[156][206][210]. [159] [157][157]";:o=0:c$=""
232 poke198,0:wait198,1:geta$:ifa$=chr$(13)ando>0thengoto239
233 ifo>0anda$=chr$(20)thenc$="":h$="":o=0:goto237
234 ifasc(a$)<48orasc(a$)>57thengoto232
235 ifo>=2thengoto232
236 c=asc(a$):c$=c$+chr$(c+128):o=o+1:h$=h$+a$
237 print"[156][206][210]. [159] [157][157]";c$
238 goto232
239 ifval(h$)<1orval(h$)>13thena$="":c$="":h$="":goto228
240 fora=1to5:print" ":next
241 t=val(h$)
242 ifq(t)=2thengoto228
243 on t gosub124,130,136,142,148,154,160,166,172,178,184,190,196
244 ift=12andu=0andz(12)>0thengoto228
245 goto101
246 x=len(str$(z)):zt$=mid$(z$,2,x-1)
247 fori=1to5:ifpu$(i)=str$(z)andna$=na$(i)thenx=i
248 nexti
249 ifz<10thenpu$(x)="00000"+zt$:return
250 ifz<100thenpu$(x)="0000"+zt$:return
251 pu$(x)="000"+zt$:return
252 open1,8,15,"s:k.scores":close1
253 open2,8,8,"k.scores,s,w"
254 fori=1to5
255 print#2,na$(i):print#2,pu$(i):next:close2:return
256 z(14)=0:fori=1to6:z(14)=z(14)+z(i):next:z(16)=0
257 ifz(14)>=63thenz(15)=35
258 z(16)=z(14)+z(15):fori=1to13:zv$(i)="":nexti:fori=1to4:y$(i)="":next:s$(1)=""
259 z(17)=0:fori=7to13:z(17)=z(17)+z(i):next
260 z(18)=z(16)+z(17)
261 fori=1to18:ifq(i)=2thenzv$(i)="---":nexti:fori=1to18
262 ifz(i)>9thengoto264
263 y=z(i):zv$(i)=chr$(y+176):zv$(i)=" "+zv$(i):nexti:goto270
264 ifz(i)>99thengoto267
265 y$=str$(z(i)):zv$=mid$(y$,2,1):z$=mid$(y$,3,1):zv=asc(zv$):z=asc(z$)
266 zv=zv+128:z=z+128:zv$(i)=" "+chr$(zv)+chr$(z):nexti:goto270
267 y$=str$(z(i)):zv$=mid$(y$,2,1):z$=mid$(y$,3,1):v$=mid$(y$,4,1)
268 zv=asc(zv$):z=asc(z$):v=asc(v$):zv=zv+128:z=z+128:v=v+128
269 zv$(i)=chr$(zv)+chr$(z)+chr$(v):nexti
270 v=53248
271 return
272 z(14)=0:fori=1to6:z(14)=z(14)+z(i):next:z(16)=0
273 ifz(14)>=63thenz(15)=35
274 z(16)=z(14)+z(15):fori=1to13:zv$(i)="":nexti:fori=1to4:y$(i)="":next:s$(1)=""
275 z(17)=0:fori=7to13:z(17)=z(17)+z(i):next
276 z(18)=z(16)+z(17):return
277 xa=pa-1:fori=patopa+4:s(i-xa)=peek(i):next
278 fori=4to1step-1
279 forj=1toi
280 ifs(j)<=s(j+1)then282
281 s7=s(j):s(j)=s(j+1):s(j+1)=s7
282 nextj
283 nexti
284 return
285 fora=0to23:pokes+a,0:next:pokes+24,15:pokes+6,15*16:fori=80to10step-1
286 pokes+1,i:pokes+4,17:foru=0to10step-1:nextu,i:pokes+24,0:fora=0to24
287 pokes+a,0:next
288 fora=0to999:next
289 v=53248:pokev+17,0:print"[147]":pokev+21,255:fora=0to6:pokev+39+a,1:next
290 pokev+16,0:pokepa,16:pokepa+1,17:pokepa+2,18:pokepa+3,19:pokepa+4,19
291 pokepa+5,20:pokepa+6,21:b=-20:fora=0to14step2:b=b+20:pokev+a,109+b:nexta
292 fora=1to13step2:pokev+a,50:next:pokev+17,27:ifz(18)<100thenb$=b$+" "
293 print"[147][159]"b$" hat"z(18)"punkte erreicht"
294 print"[156]"b$" hat"z(18)"punkte erreicht"
295 z=z(18):na$=b$
296 z$=str$(z):pokev+17,27
297 ifz<val(pu$(5))then304
298 pu$(5)=z$:na$(5)=b$:i=5
299 i=i-1:ifval(pu$(i))>=zthengoto304
300 pu$(i+1)=pu$(i):na$(i+1)=na$(i)
301 pu$(i)=str$(z):na$(i)=na$
302 ifi>1thengoto299
303 pokev+21,255:pokev+46,1
304 geta$:ifa$=" "then310
305 b=int(rnd(1)*255):pokev+14,b:pokev+15,b:pokepa+7,28
306 fora=0to99:next:pokepa+7,29:fora=0to99:next:pokepa+7,28:fora=0to99:next
307 pokepa+7,30:fora=0to99:next
308 goto304
309 remub4400:gosub4450
310 print"[147]":pokev+21,0:gosub246:gosub252:goto12
311 s1=0:s2=0:s3=0:s4=0:s5=0:s6=0:fori=1to5
312 ifs(i)=22thens1=s1+1
313 ifs(i)=23thens2=s2+1
314 ifs(i)=24thens3=s3+1
315 ifs(i)=25thens4=s4+1
316 ifs(i)=26thens5=s5+1
317 ifs(i)=27thens6=s6+1
318 ifs1>1thens(i)=0:s1=s1-1
319 ifs2>1thens(i)=0:s2=s2-1
320 ifs3>1thens(i)=0:s3=s3-1
321 ifs4>1thens(i)=0:s4=s4-1
322 ifs5>1thens(i)=0:s5=s5-1
323 ifs6>1thens(i)=0:s6=s6-1
324 next:fori=1to5:s(i)=s(i)-21:next
325 gosub278
326 ifs(5)=6thenifs(1)=1ands(2)=2ands(3)=3ands(4)=4thenz(10)=30
327 ifs(2)=1ands(3)=2ands(4)=3ands(5)=4thenz(10)=30
328 ifs(2)=2ands(3)=3ands(4)=4ands(5)=5thenz(10)=30
329 ifs(2)=3ands(3)=4ands(4)=5ands(5)=6thenz(10)=30
330 ifs(1)=2ands(2)=3ands(3)=4ands(4)=5thenz(10)=30
331 goto181