home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 17 / 64er_Magazin_Sonderheft_17_19xx_Markt__Technik_de_Side_A.d64 / skat.bas (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  11KB  |  436 lines

  1. 1 rem *************
  2. 2 rem *           *
  3. 3 rem *  s k a t  *
  4. 4 rem *           *
  5. 5 rem *************
  6. 6 rem
  7. 7 z(1)=0:z(2)=0:z(3)=0:s=0
  8. 8 poke53280,14:poke53281,14
  9. 9 ifs>0thenprint"[144]":goto21
  10. 10 print"[147][144][216][216][216][216][216][216][216][216]  [193][193][193]    [193][193][193]  [211][211][211][211][211][211][211][211]  [218][218][218][218][218][218][218][218]";
  11. 11 print"[144][216][216][216][216][216][216][216][216]  [193][193][193]   [193][193][193]   [211][211][211][211][211][211][211][211]  [218][218][218][218][218][218][218][218]";
  12. 12 print"[144][216][216]        [193][193][193]  [193][193][193]    [211][211]    [211][211]     [218][218]  "
  13. 13 print"[144][216][216]        [193][193][193] [193][193][193]     [211][211]    [211][211]     [218][218]  "
  14. 14 print"[144][216][216][216][216][216][216][216][216]  [193][193][193][193][193][193]      [211][211][211][211][211][211][211][211]     [218][218]  "
  15. 15 print"[144][216][216][216][216][216][216][216][216]  [193][193][193][193][193][193]      [211][211][211][211][211][211][211][211]     [218][218]  "
  16. 16 print"[144]      [216][216]  [193][193][193] [193][193][193]     [211][211]    [211][211]     [218][218]  "
  17. 17 print"[144]      [216][216]  [193][193][193]  [193][193][193]    [211][211]    [211][211]     [218][218]  "
  18. 18 print"[144][216][216][216][216][216][216][216][216]  [193][193][193]   [193][193][193]   [211][211]    [211][211]     [218][218]  "
  19. 19 print"[144][216][216][216][216][216][216][216][216]  [193][193][193]    [193][193][193]  [211][211]    [211][211]     [218][218]  "
  20. 20 gosub162
  21. 21 dima$(32),a(32),b$(2,32),q(32),v(16),k(15),y(12):a=rnd(-ti)
  22. 22 fort=1to16:readv(t):next
  23. 23 fort=1to4:readj(t):next
  24. 24 fort=0to15:readk(t):next
  25. 25 fort=1to4:readu(t):next
  26. 26 fort=1to4:readn(t):next
  27. 27 fort=0to31:reada:poke828+t,a:next
  28. 28 fort=1to32:reada$(t):next
  29. 29 fory=1to3
  30. 30 fort=1to10
  31. 31 a=int(rnd(1)*32)+1
  32. 32 ifa(a)>0then31
  33. 33 a(a)=y:nextt,y
  34. 34 ifs=0theninput"[147][144]welcher spieler teilt aus ";s:ifs<1ors>3thens=0:goto34
  35. 35 df=s
  36. 36 y=1:x=-5:ifs=2then de=3
  37. 37 ifs=3thende=2
  38. 38 gosub329:print"spieler"aa"hat das 1. reizen gewonnen.":gosub118:op=s
  39. 39 fg=5:ifaa=1ands=2thenns=-1:de=2:gosub332:goto44
  40. 40 ifaa=1ands=3thens=-1:de=3:gosub332:goto44
  41. 41 ifaa=2ands=1thens=0:de=2:gosub332:goto44
  42. 42 ifaa=3ands=1thens=0:de=3:gosub332:goto44
  43. 43 ifaa=2ands=3oraa=3ands=2thens=1:gosub332
  44. 44 gosub117:s=op:sw=sw(aa)+96:print"spieler"aa"spielt alleine !"
  45. 45 ifaa=1thengosub118:goto48
  46. 46 print""chr$(sw(aa))" ist trumpf !":gosub305
  47. 47 ol=9:v=aa:gosub337:ol=0:gosub118:goto74
  48. 48 sys828
  49. 49 fort=1to32
  50. 50 ifa(t)=0thena(t)=aa
  51. 51 ifa(t)=1thengosub163
  52. 52 next:y=1:x=-5
  53. 53 gosub134:input"1.welche karte soll weg ";i$:gosub202:p$=i$
  54. 54 b$(1,1)=i$
  55. 55 gosub134:input"2.welche karte soll weg ";i$:gosub202
  56. 56 b$(1,2)=i$:q(1)=2:a=0
  57. 57 fort=1to28
  58. 58 ifa(t)>1then60
  59. 59 ifa$(t)=p$ora$(t)=i$thena=a+1
  60. 60 next:ifa=2then62
  61. 61 gosub116:q(1)=0:goto53
  62. 62 fort=1to28
  63. 63 ifa(t)>1then65
  64. 64 ifa$(t)=p$ora$(t)=i$thena(t)=0
  65. 65 next
  66. 66 sys828:gosub166
  67. 67 gosub134:input"willst du grand spielen ";o$:ifo$<>"n"ando$<>"j"then67
  68. 68 ifo$="j"thenfg=9:v=1:gosub337:fg=0:sw(1)=0:sw=0:as(1)=0:rw(1)=ty*24
  69. 69 ifo$="j"then74
  70. 70 gosub134:input"welche farbe ist trumpf ";o$
  71. 71 ifo$<>"[193]"ando$<>"[211]"ando$<>"[218]"ando$<>"[216]"then70
  72. 72 ol=9:sw(1)=asc(o$)-96:v=1:gosub337:ol=0
  73. 73 sw=asc(o$)
  74. 74 fortt=1to3
  75. 75 s=s+1:ifs=4thens=1
  76. 76 ifs=1thengosub169:goto79
  77. 77 iftt=1thensys828:y=1:x=-5:gosub166:gosub178:goto79
  78. 78 gosub268
  79. 79 c(s)=k:k$(tt)=a$(k):l(tt)=s
  80. 80 z$=a$(k):d=d+6:x=d:y=16:yy=9:gosub143
  81. 81 next
  82. 82 gosub118:hz=0:gosub392:gosub421
  83. 83 ifasc(k$(1))=asc(k$(2))andasc(k$(2))=asc(k$(3))then111
  84. 84 t=asc(k$(1)):tt=asc(right$(k$(1),1))
  85. 85 v=asc(right$(k$(2),1))
  86. 86 ift=asc(k$(2))andtt>vthenll=l(1)
  87. 87 ift=asc(k$(2))andtt<vthenll=l(2)
  88. 88 v=asc(right$(k$(3),1))
  89. 89 ift=asc(k$(3))andtt>vthenll=l(1)
  90. 90 ift=asc(k$(3))andtt<vthenll=l(3)
  91. 91 h=0:forv=1to3
  92. 92 ifasc(right$(k$(v),1))=78thenh=h+1:j=v
  93. 93 next:ifh>1then120
  94. 94 ifh=1thenll=l(j):goto99
  95. 95 h=0:forv=1to3
  96. 96 ifasc(k$(v))=swthenh=h+1:j=v
  97. 97 next:ifh=1thenll=l(j)
  98. 98 ifh=2then128
  99. 99 ifll=aathent=1:goto101
  100. 100 t=2
  101. 101 forv=1to3
  102. 102 q(t)=q(t)+1:b$(t,q(t))=k$(v)
  103. 103 next:d=0:ifll=0thens=ll:goto105
  104. 104 s=ll-1
  105. 105 forv=1to32
  106. 106 ifa$(v)=k$(1)ora$(v)=k$(2)ora$(v)=k$(3)thena(v)=0
  107. 107 next:a=0
  108. 108 forv=1to32:ifa(v)=1thena=a+1
  109. 109 next:ifa=0then211
  110. 110 goto74
  111. 111 tt=0
  112. 112 forv=1to3
  113. 113 qq=asc(right$(k$(v),1))
  114. 114 ifqq>ttthentt=asc(right$(k$(v),1)):ee=v
  115. 115 next:ll=l(ee):goto99
  116. 116 gosub134:print"fehler[146]":forkk=1to2000:next:return
  117. 117 print"spieler"aa"hat das 2. reizen gewonnen.":return
  118. 118 gosub134:print"[144]            taste druecken !":poke198,0:wait198,1
  119. 119 gosub134:return
  120. 120 gg=0:forv=1to3
  121. 121 h=asc(k$(v)):j=asc(right$(k$(v),1))
  122. 122 ifj<78then127
  123. 123 ifh=216thenll=l(v):goto99
  124. 124 ifh=193andgg<3thengg=3:ll=l(v)
  125. 125 ifh=211andgg<2thengg=2:ll=l(v)
  126. 126 ifh=218andgg<1thengg=1:ll=l(v)
  127. 127 next:goto99
  128. 128 forv=1to3
  129. 129 h=asc(k$(v)):j=asc(right$(k$(v),1))
  130. 130 ifh=swandgg<jthengg=j:ll=l(v)
  131. 131 ifh=swandgg<jthengg=j:ll=l(v)
  132. 132 next:h=0:j=0
  133. 133 goto99
  134. 134 poke211,0:poke214,23:sys58640:poke781,23:sys59903:return
  135. 135 data18,20,22,23,24,27,30,33,36,40,44,45,48,50,55,60,1,2,4,8,0,2,2,3,3,2
  136. 136 data2,4,4,2,2,3,3,2,2,5,122,115,97,120,120,97,115,122,169,147,32,210,255
  137. 137 data162,8,169,1,157,223,219,189,82,3,157,223,7,202,16,242,96,11,18,21,12
  138. 138 data12,19,15,6,20,96
  139. 139 data"[218]7","[218]8","[218]9","[218]d","[218]k","[218]l","[218]m"
  140. 140 data"[211]7","[211]8","[211]9","[211]d","[211]k","[211]l","[211]m"
  141. 141 data"[193]7","[193]8","[193]9","[193]d","[193]k","[193]l","[193]m"
  142. 142 data"[216]7","[216]8","[216]9","[216]d","[216]k","[216]l","[216]m","[218]n","[211]n","[193]n","[216]n"
  143. 143 f$=right$(z$,1)
  144. 144 z$=left$(z$,1)
  145. 145 poke211,0:poke214,y-1:sys58640
  146. 146 iff$="l"thenf$="z"
  147. 147 iff$="m"thenf$="a"
  148. 148 iff$="n"thenf$="b"
  149. 149 ifz$="[218]"orz$="[211]"thenz$=""+z$+"[144]":f$=""+f$+"[144]"
  150. 150 d$="":ifx<>35thend$=chr$(13)
  151. 151 printspc(x)"[213][192][192][192][201]"d$;
  152. 152 printspc(x)"[221]"f$" "f$"[221]"d$;
  153. 153 printspc(x)"[221]   [221]"d$;
  154. 154 printspc(x)"[221] "z$" [221]"d$;
  155. 155 printspc(x)"[221]   [221]"d$;
  156. 156 printspc(x)"[221]"f$" "f$"[221]"d$;
  157. 157 printspc(x)"[202][192][192][192][203]"
  158. 158 ifyy<>9thenreturn
  159. 159 ifs=aathenprint"";:hz=tt
  160. 160 yy=0:printspc(x)"s #"s""
  161. 161 return
  162. 162 gosub134:printspc(30)"krullsoft";:return
  163. 163 z$=a$(t)
  164. 164 x=x+5:ifx=40theny=y+7:x=0
  165. 165 gosub143:return
  166. 166 fort=1to32
  167. 167 ifa(t)=1thengosub163
  168. 168 next:y=1:x=-5:return
  169. 169 iftt=1thensys828:y=1:x=-5:gosub166
  170. 170 gosub134:input"welche karte soll gesetzt werden ";i$:gosub202
  171. 171 a=0:fort=1to32
  172. 172 ifa(t)<>1then174
  173. 173 ifi$=a$(t)thena=9
  174. 174 next:ifa=0thengosub116:goto170
  175. 175 forw=1to32:ifa$(w)=i$thenk=w:goto177
  176. 176 nextw
  177. 177 return
  178. 178 k=0:cc=0:rr=100:ifaa<>sthengosub411:ifrr<100thenreturn
  179. 179 ifaa<>sthen191
  180. 180 fort=1to32
  181. 181 ifa(t)<>sthen190
  182. 182 ifasc(right$(a$(t),1))=78thenk=t:return
  183. 183 forj9=1to4
  184. 184 forai=1to3:ifs=aithen186
  185. 185 ify(ai*4-4+j9)=1andasc(a$(t))-96=u(j9)then190
  186. 186 nextai,j9
  187. 187 j=asc(a$(t)):h=asc(right$(a$(t),1))
  188. 188 ifh=77andj<>swthenk=t:return
  189. 189 ifj<>swandrr>hthenrr=h:k=t
  190. 190 nextt:ifrr<100thenreturn
  191. 191 rr=100
  192. 192 fort=1to28
  193. 193 ifa(t)<>sthen196
  194. 194 j=asc(a$(t)):h=asc(right$(a$(t),1))
  195. 195 ifj<>swandrr>hthenrr=h:k=t
  196. 196 next:ifrr<100thenj=0:h=0:return
  197. 197 rr=0
  198. 198 fort=1to32
  199. 199 h=asc(right$(a$(t),1))
  200. 200 ifa(t)=sandh>rrthenrr=h:k=t
  201. 201 next:h=0:return
  202. 202 q$=right$(i$,1)
  203. 203 ifq$="z"thenq$="l":goto207
  204. 204 ifq$="a"thenq$="m":goto207
  205. 205 ifq$="b"thenq$="n":goto207
  206. 206 return
  207. 207 i$=left$(i$,1)+q$:return
  208. 208 fort=1to28
  209. 209 ifa(t)=sandasc(a$(t))=swthenk=t:return
  210. 210 next:return
  211. 211 sys828:printspc(15)"auswertung"
  212. 212 ifcc<>5thena=0
  213. 213 ifq(1)=0then222
  214. 214 fort=1toq(1)
  215. 215 b$=right$(b$(1,t),1)
  216. 216 ifb$="d"thena=a+3
  217. 217 ifb$="k"thena=a+4
  218. 218 ifb$="l"thena=a+10
  219. 219 ifb$="m"thena=a+11
  220. 220 ifb$="n"thena=a+2
  221. 221 next
  222. 222 gosub255
  223. 223 print"spieler"aa"hat"a"punkte !"
  224. 224 print"spieler";:n=0
  225. 225 fort=1to3
  226. 226 ift=aathen229
  227. 227 printt;:n=n+1
  228. 228 ifn=1thenprint"und";
  229. 229 next:print"haben"120-a"punkte!"
  230. 230 b$="    ":a$(0)="-":a$(1)="[144]":a$(2)="[144]+":
  231. 231 ifa<30thenrw(aa)=rw(aa)+as(aa)
  232. 232 ifa<61thenrw(aa)=(0-rw(aa))*2
  233. 233 f=0-rw(aa):i(4)=rw(aa)
  234. 234 fort=1to3
  235. 235 ift=aathenz(aa)=z(aa)+rw(aa):goto237
  236. 236 z(t)=z(t)+f
  237. 237 next
  238. 238 i(1)=z(1):i(2)=z(2):i(3)=z(3)
  239. 239 h=4:c=4:gosub264
  240. 240 i(1)=z(1)-z(3):k(1)=i(1)
  241. 241 i(2)=z(2)-z(1):k(2)=i(2)
  242. 242 i(3)=z(3)-z(1):k(3)=i(3)
  243. 243 h=3:c=6:gosub264
  244. 244 i(1)=z(1)-z(2):k(1)=k(1)+i(1)
  245. 245 i(2)=z(2)-z(3):k(2)=k(2)+i(2)
  246. 246 i(3)=z(3)-z(2):k(3)=k(3)+i(3)
  247. 247 c=7:gosub264
  248. 248 i(1)=k(1):i(2)=k(2):i(3)=k(3)
  249. 249 c=9:gosub264
  250. 250 s=df
  251. 251 s=s+1:ifs=4thens=1
  252. 252 gosub118
  253. 253 print"[147][153][154]7z(1)="z(1)"[157]:z(2)="z(2)"[157]:z(3)="z(3)"[157]:s="s
  254. 254 print"run";:poke631,13:poke632,13:poke198,2:end
  255. 255 print"spieler:[194]  1  [221]  2  [221]  3  [221]summe[194]"
  256. 256 print"        [171][192][192][192][192][192][219][192][192][192][192][192][219][192][192][192][192][192][219][192][192][192][192][192][179]"
  257. 257 print"        [194]     [194]     [194]     [194]     [194]"
  258. 258 print"        [171][192][192][192][192][192][219][192][192][192][192][192][219][192][192][192][192][192][219][192][192][192][192][192][189]"
  259. 259 print"        [221]     [221]     [221]     [221]"
  260. 260 print"        [221]     [221]     [221]     [221]"
  261. 261 print"        [221]-----[221]-----[221]-----[221]"
  262. 262 print"        [221]     [221]     [221]     [221]"
  263. 263 return
  264. 264 fora=1toh
  265. 265 a$=str$(i(a)):b=len(a$):a$=right$(a$,b-1):b=b-1
  266. 266 c$=a$(sgn(i(a))+1)+left$(b$,4-b)+a$
  267. 267 poke214,c:poke211,9+(a-1)*6:sys58640:printc$:next:return
  268. 268 v=asc(k$(1)):h2=asc(right$(k$(1),1)):k=0:l=0:ifh2=78thenv=sw
  269. 269 fort=1to28
  270. 270 ifa(t)<>sthen274
  271. 271 j=asc(a$(t)):q2=asc(right$(a$(t),1))
  272. 272 ifv=jthenl=9:ifq2>h2thenk=t:gosub432:ifcc=9thenreturn
  273. 273 ifcc=8then387
  274. 274 next:q3=0:q4=0
  275. 275 ifhz>0andtt=3thenq3=asc(right$(k$(hz),1)):q4=asc(right$(k$(3-hz),1))
  276. 276 ifl=9then295
  277. 277 b=100
  278. 278 fort=32to1step-1
  279. 279 ifa(t)<>sthen282
  280. 280 j=asc(a$(1)):q=asc(right$(a$(t),1))
  281. 281 ifq<bthenb=q:k=t
  282. 282 next
  283. 283 iftt=3thenifv<>swandq4>q3andv=asc(k$(2))ands<>aathen384
  284. 284 iftt=3thenifv<>swandhz=1andasc(k$(2))=swands<>aathen384
  285. 285 iftt=3thenifhz=1andasc(right$(k$(2),1))=78andv<>swands<>aathen384
  286. 286 iftt=3theno8=asc(right$(k$(2),1))
  287. 287 iftt=3thenifv=asc(k$(2))andv<>swando8>75ands=aathengosub208
  288. 288 ifh2<75andv<>swthenreturn
  289. 289 ifv=0andh2<78thenreturn
  290. 290 j7=k:ifv<>swthengosub208:ifj7<>kthenreturn
  291. 291 fort=28to32:ifa(t)<>sthen293
  292. 292 ifasc(right$(a$(t),1))=78thenk=t:return
  293. 293 next:iftt=3thenifq4>q3andv=asc(k$(2))ands<>aathen384
  294. 294 return
  295. 295 iftt=3thenifq4>q3andv=asc(k$(2))ands<>aathen387
  296. 296 iftt=3thenifv<>swandhz=1andasc(k$(2))=swands<>aathen387
  297. 297 iftt=3thenifhz=1andasc(right$(k$(2),1))=78andv<>swands<>aathen387
  298. 298 h=100:fort=1to28
  299. 299 ifa(t)<>sthen302
  300. 300 q=asc(right$(a$(t),1))
  301. 301 ifv=asc(a$(t))andq<hthenh=q:k=t
  302. 302 next:ifv=swandh2>74andh2<78then291
  303. 303 ifv=swandasc(right$(a$(k),1))>68then291
  304. 304 return
  305. 305 fort=1to32:ifa(t)=0thena(t)=aa
  306. 306 next
  307. 307 fort=1to4:c(t)=0:next
  308. 308 fort=1to28
  309. 309 ifa(t)<>aathen315
  310. 310 a=asc(a$(t))-96
  311. 311 ifa=122thenc(1)=c(1)+1
  312. 312 ifa=115thenc(2)=c(2)+1
  313. 313 ifa=97thenc(3)=c(3)+1
  314. 314 ifa=120thenc(4)=c(4)+1
  315. 315 next:a=0
  316. 316 fort=1to4
  317. 317 ifc(t)<3andc(t)>0thenc(t)=c(t)-1:gosub325:ifa<2then317
  318. 318 ifa=2thenreturn
  319. 319 next
  320. 320 fort=1to28:ifa(t)<>aaorasc(a$(t))-96=sw(aa)then324
  321. 321 h=asc(right$(a$(t),1))
  322. 322 ifh=55orh=56orh=57thena=a+1:q(1)=q(1)+1:b$(1,q(1))=a$(t):a(t)=0
  323. 323 ifa=2thenreturn
  324. 324 next:return
  325. 325 forkk=1to28:ifa(kk)<>aathen328
  326. 326 ifasc(a$(kk))-96=u(t)andasc(a$(kk))-96<>sw(aa)thenko=9
  327. 327 ifko=9thenko=0:a=a+1:q(1)=q(1)+1:b$(1,q(1))=a$(kk):a(kk)=0:return
  328. 328 next:return
  329. 329 y=1:x=-5:gosub166
  330. 330 print" rechne aus,wie hoch du reizen kannst !"
  331. 331 gosub118
  332. 332 ab=s+2:ifab=4thenab=1
  333. 333 ifab=5thenab=2
  334. 334 print"[147]"spc(17)"reizen"
  335. 335 iffg=5thenfg=0:goto361
  336. 336 forv=1to3
  337. 337 forj=1to8:c(j)=0:next:h=0
  338. 338 fort=1to32
  339. 339 ifa(t)<>vthen346
  340. 340 ifasc(right$(a$(t),1))=78thenh=4
  341. 341 a=asc(a$(t))-96
  342. 342 ifa=120thenc(h+1)=c(h+1)+1
  343. 343 ifa=97thenc(h+2)=c(h+2)+1
  344. 344 ifa=115thenc(h+3)=c(h+3)+1
  345. 345 ifa=122thenc(h+4)=c(h+4)+1
  346. 346 h=0:next
  347. 347 forj=1to4
  348. 348 ifc(j)>hthenh=c(j):a=j
  349. 349 next:ifol=9then351
  350. 350 sw(v)=n(a):ifv=1thensw(1)=120
  351. 351 a=0:forj=5to8
  352. 352 ifc(j)=1thena=a+j(j-4)
  353. 353 next:a=k(a):ifv=1anda=0thena=5
  354. 354 ty=a:iffg=9thenreturn
  355. 355 ifsw(v)=120thenrw(v)=12*a:as(v)=12
  356. 356 ifsw(v)=97thenrw(v)=11*a:as(v)=11
  357. 357 ifsw(v)=115thenrw(v)=10*a:as(v)=10
  358. 358 ifsw(v)=122thenrw(v)=9*a:as(v)=9
  359. 359 ifol=9thenreturn
  360. 360 next
  361. 361 ifab=1then374
  362. 362 ifab=2then365
  363. 363 ifrw(2)>rw(3)thenaa=2:return
  364. 364 aa=3:return
  365. 365 ifrw(de)=0thenprint"ich reize nich !":aa=1:return
  366. 366 fort=1to16
  367. 367 ifv(t)>rw(de)then373
  368. 368 print"hast du"v(t)" punkte "
  369. 369 input"(j/n)";a$:ifa$<>"j"anda$<>"n"thenprint"[145]";:goto369
  370. 370 ifa$="n"thenaa=de:return
  371. 371 ifa$="j"andv(t)>rw(1)thenprint"so viel hast du nicht !":aa=de:return
  372. 372 next:aa=de:return
  373. 373 print"ich habe nicht mehr !":aa=1:return
  374. 374 print"fange an zu reizen (18-60)"
  375. 375 print"willst du nicht mehr weiter reizen,dann gib 0 ein.":h=0
  376. 376 fort=1to16
  377. 377 a=h:input"zahl ";h:ifh=0thenprint"dann nicht !":aa=de:return
  378. 378 forv=1to16:ifv(v)=hthen380
  379. 379 nextv:print"fehler ![146]":h=a:goto377
  380. 380 ifh>rw(1)thenprint"so viel hast du nicht !":aa=de:return
  381. 381 ifh<=athenprint"fehler ![146]":goto377
  382. 382 ifh>rw(de)thenprint"so viel habe ich nicht !":aa=1:return
  383. 383 nextt:aa=1:return
  384. 384 b=0:fort=1to28:ifa(t)<>sthen386
  385. 385 ifasc(right$(a$(t),1))>bthenk=t:b=asc(right$(a$(t),1))
  386. 386 next:return
  387. 387 fort=28to1 step-1
  388. 388 ifa(t)<>sthen390
  389. 389 ifv=asc(a$(t))thenk=t:return
  390. 390 next:ifv=swandh2>74andh2<78then291
  391. 391 return
  392. 392 a=0:j1=asc(k$(1)):j2=asc(k$(2)):j3=asc(k$(3)):i1=asc(right$(k$(1),1))
  393. 393 i2=asc(right$(k$(2),1)):i3=asc(right$(k$(3),1)):h=0
  394. 394 ifsw=0andi1=78andi2<78thenrr(l(2))=1:return
  395. 395 ifsw=0andi1=78andi3<78thenrr(l(3))=1:return
  396. 396 ifj1=swsori1=78then402
  397. 397 ifj1<>j2thena=2:gosub405
  398. 398 ifj1<>j3thena=3:gosub405
  399. 399 ifi2=78thena=2:gosub405
  400. 400 ifi3=78thena=3:gosub405
  401. 401 return
  402. 402 ifj2<>swandi2<>78thena=2:gosub408
  403. 403 ifj3<>swandi3<>78thena=3:gosub408
  404. 404 return
  405. 405 h=l(a):fort=1to4
  406. 406 ifu(t)=j1-96theny(4*h-4+t)=1
  407. 407 next:return
  408. 408 h=l(a):fort=1to4
  409. 409 ifu(t)=sw-96theny(4*h-4+t)=1
  410. 410 next:return
  411. 411 fort=1to32
  412. 412 ifa(t)<>sthen420
  413. 413 ifasc(right$(a$(t),1))=78thenrr=0:k=t:return
  414. 414 forj9=1to4
  415. 415 ify(aa*4-4+j9)=1andasc(a$(t))-96=u(j9)then420
  416. 416 nextj9
  417. 417 j=asc(a$(t)):h=asc(right$(a$(t),1))
  418. 418 ifh=77andj<>swthenk=t:rr=0:return
  419. 419 ifj<>swandrr>hthenrr=h:k=t
  420. 420 nextt:return
  421. 421 fort=1to3:ifl(t)=1thencc=t
  422. 422 next:a$=k$(cc)
  423. 423 ifrr(1)=1andasc(right$(a$,1))=78then429
  424. 424 fort=1to4
  425. 425 ify(t)=1andasc(a$)-96=u(t)andasc(right$(a$,1))<78then428
  426. 426 ify(t)=1andu(t)=sw-96andasc(right$(a$,1))=78then428
  427. 427 next:return
  428. 428 gosub134:print"[145][145][145][145][145][145][145][145][145]du hast gemogelt !":goto430
  429. 429 gosub134:print"[145][145][145][145][145][145][145][145][145]du hattest ja doch noch einen buben !"
  430. 430 gosub118:cc=5:q(1)=0:ifaa=1thena=0:goto211
  431. 431 a=120:goto211
  432. 432 cc=0:iftt=2thencc=9:return
  433. 433 a1=asc(right$(k$(1),1)):a2=asc(right$(k$(2),1)):a3=asc(right$(a$(k),1))
  434. 434 ifasc(k$(1))=asc(k$(2))anda3>a2anda3>a1anda2<78andv<>swthencc=8:return
  435. 435 return
  436.