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 >
Commodore BASIC  |  2023-02-26  |  3KB  |  92 lines

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