home *** CD-ROM | disk | FTP | other *** search
/ Dimension 64 15 / Dimension_64_Nr.15_19xx_-_de_Side_B.d64 / kniffel (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  10KB  |  323 lines

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