home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tiger Disk 82
/
Tiger_Disk_082_20xx_Tiger-Crew-Disk_de_Side_B.d64
/
labyrinth
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
3KB
|
92 lines
0 poke53280,0:poke53281,0:goto100
1 print"[147][151]":s=x:t=y:fori=1to4
2 pn=peek(b+(s+xv)*m+t+yv):ifpeek(b+(s-yv)*m+t+xv)<2then9
4 printleft$(s9$,p(i))spc(p(i-1))left$(s1$,p(i)-p(i-1))
5 printleft$(s9$,23-p(i))spc(p(i-1))left$(s2$,p(i)-p(i-1))
6 ifi<>1thenprintleft$(s9$,p(i-1)+1)spc(p(i-1)-1)left$(s4$,(11-p(i-1))*6);
7 ifpn>1then12
8 goto13
9 printleft$(s9$,p(i-1)+1)spc(p(i-1))left$(s5$,(p(i)-p(i-1))*2)
10 printleft$(s9$,22-p(i-1))spc(p(i-1))left$(s6$,(p(i)-p(i-1))*2)
11 ifpn>1andpn<>255then13
12 printleft$(s9$,p(i)+1)spc(p(i)-1)left$(s4$,(11-p(i))*6);
13 ifpeek(b+(s+yv)*m+t-xv)<2then19
14 printleft$(s9$,p(i))spc(22-p(i))left$(s1$,p(i)-p(i-1))
15 printleft$(s9$,23-p(i))spc(22-p(i))left$(s2$,p(i)-p(i-1));
16 ifi<>1thenprintleft$(s9$,p(i-1)+1)spc(22-p(i-1))left$(s3$,(11-p(i-1))*6-2);
17 ifpn>1then22
18 goto23
19 printleft$(s9$,p(i))spc(22-p(i))left$(s6$,(p(i)-p(i-1))*2)
20 printleft$(s9$,23-p(i))spc(22-p(i))left$(s5$,(p(i)-p(i-1))*2-1);
21 ifpn>1andpn<>255then23
22 printleft$(s9$,p(i)+1)spc(22-p(i))left$(s3$,(11-p(i))*6-2);
23 ifpn=255then27
24 ifpn>1then28
25 printleft$(s9$,p(i))spc(p(i))left$(s1$,(11-p(i))*2)
26 printleft$(s9$,23-p(i))spc(p(i))left$(s2$,(11-p(i))*2);:return
27 printleft$(s9$,11)spc(8)"ende[146]":return
28 s=s+xv:t=t+yv:next
29 printleft$(s9$,11)spc(10)"[205][206][157][157][206][205]":return
30 fori=1tom-1:forj=1tom-1:pokeb+i*m+j,1:nextj,i
31 fori=0tom:pokeb+i,0:pokeb+m*m+i,0:pokeb+m*i,0:next:pokeb+1,255:pokeb+m+1,2
32 n=1:fori=1tom-1step2:forj=1tom-1step2:n=n+1:x=i:y=j
33 ifrnd(1)<.5thenxv=1:yv=0:goto34
34 xv=0:yv=1:ifpeek(b+m*i+j)=1then38y.
35 xx=x+xv*2:yy=y+yv*2:ifxx<0orxx>moryy<0oryy>mthennextj,i:goto49
36 ifpeek(b+xx*m+yy)<>1thennextj,i:goto49
37 pokeb+(x+xv)*m+y+yv,n:x=xx:y=yy:pokeb+x*m+y,n:gosub45:goto35
38 pokeb+x*m+y,n:xx=x+xv*2:yy=y+yv*2:ifxx<0orxx>moryy<0oryy>mthen41
39 ifpeek(b+xx*m+yy)=1then44
40 ifpeek(b+xx*m+yy)<>nthenpokeb+(x+xv)*m+y+yv,n:nextj,i:goto49
41 ifrnd(1)<.5thenxv=-1:yv=0:goto42
42 xv=0:yv=-1:ifpeek(b+(i+xv)*m+j+yv)=0thent=xv:xv=yv:yv=t
43 pokeb+(i+xv)*m+j+yv,n:nextj,i:goto49
44 pokeb+(x+xv)*m+y+yv,n:x=xx:y=yy:pokeb+x*m+y,n:gosub45:goto38
45 p=rnd(1):ifp<.25thenxv=1:yv=0:return
46 ifp<.5thenxv=0:yv=1:return
47 ifp<.75thenxv=-1:yv=0:return
48 xv=0:yv=-1:return
49 pokeb+fnx(0)*m+fnx(0)+1,2:pokeb+(fnx(0)+1)*m+fnx(0),2
50 x=fnx(0)+1:y=fnx(0)+1:poke36878,8:gosub45:ti$="000000"
51 poke36875,215:fori=1to50:next:poke36875,0
52 gosub1
53 t$=mid$(ti$,3,2)+":"+right$(ti$,2):prints9$t$;
54 ifct=0then59
55 k=peek(56321):if(kand4)=0thenk=32:goto59
56 if(kand16)=0thenk=33:goto60
57 if(kand32)=0thenk=36:goto62
58 poke37154,0:k=peek(37152):poke3715{$7f}{$7b}{$7b}55:if(kand128)=0thenk=30:goto61
59 k=peek(56321):ifk=239thenpoke36874,204:goto65
60 ifk=253thent=xv:xv=-yv:yv=t:goto51
61 ifk=254thent=xv:xv=yv:yv=-t:goto51
62 ifk=251thengosub73:fori=1to4000:next:goto52
63 ifk=19thengosub73:printleft$(s9$,x+1)spc(y)"*":goto69
64 goto53
65 xx=x+xv:yy=y+yv:pn=peek(b+xx*m+yy):poke36874,0:ifpn<2goto53
67 ifpn<>255thenx=xx:y=yy:goto52
68 poke36874,248:poke36879,52:fori=1to1000:next:poke36879,27:poke36874,0:gosub73
69 poke198,0:prints9$"zeit:"t$;
72 run
73 print"[147]";:fori=0tom:forj=0tom
74 ifpeek(b+i*m+j)<2thenprint" [146]";:goto76
75 print" ";
76 nextj:print:nexti:return
77 poke51,168:poke52,28:poke55,168:poke56,28:clr:b=7337
78 deffnx(x)=int(rnd(1)*m/4+m/5)*2:dimp(5):fori=1to20
79 s1$=s1$+chr$(164):s2$=s2$+chr$(163):s3$=s3$+chr$(165)+"[157]":s4$=s4$+chr$(167)+"[157]"
80 next:fori=1to4:s5$=s5$+"[205]":s6$=s6$+"[206][145]":next
81 s9$=""
82 fori=0to5:readp(i):next:data0,1,5,8,10,11
83 input"[147]spielgrad (4-9)";m
84 m=2*m:goto30
100 print"[147] labyrinth"
110 print"
120 [153]" (w) 1994 by keen acid / deutsch 1994"
160 [153]" sys _ - deflinks"
165 [153]" sys 1 - defrechts"
170 [153]" sys space - defgeradeaus"
180 [153]" sys ctrl - defkartenuebersicht"
190 [153]" druecke space"
200 [161]a$:[139]a$[178]""[167]200
210 [139]a$[178]" "[167][137]77