Cool
(I'm going to have to look at the source >.>). I had tried to make this using your code, but the "erase 4 of the lines" part kinda confused me.
_player1537 wrote:
Cool
(I'm going to have to look at the source >.>). I had tried to make this using your code, but the "erase 4 of the lines" part kinda confused me.
Oh, my bad, I meant to post the source. prgmMAZEGEN is first, the main program, and prgmZMAZE is second, the recursion function. I believe that I maxed out my DCS header size in terms of which features I use (except for a 17x17 icon):
BASIC Code wrote:
::"MAZE GENERATOR
::DCS
:"FF81EF85B59591FF
::A
:ZMAZE
::
:If 1337≠det([[42
:Then
:¦ Disp "NEED DOORS CS 7","DCS.CEMETECH.NET
:¦ Return:End
:sum(16
:Input "CORRIDOR WIDTH:",W
:0→Xmin
:94→Xmax
:0→Ymin
:62→Ymax
:AxesOff:ClrDraw
:Wint(94/W
:Line(0,0,Ans,0
:Line(0,0,0,Wint(62/W
:Line(Ans,Wint(62/W),Ans,0
:Line(Ans,Wint(62/W),0,Wint(62/W
:{0,Ans,0,Wint(62/W→L
1
:{0,0,0,0,0,0→L
2
:prgmZMAZE
:sum(16
:DispGraph
:Pause :ClrHome
:Disp "MAZE GENERATOR","BY Kerm MARTIAN
Generated by
SourceCoder, © 2005-2010
Cemetech
BASIC Code wrote:
:Ans
:For(X,1,6
:¦ L
2(X:sum(14
:End
:L
1→L
2
:augment(L
2,{L
2(1)+WrandInt(1,‾1+(L
2(2)-L
2(1))/W),L
2(3)+WrandInt(1,‾1+(L
2(4)-L
2(3))/W)→L
2
:Line(L
2(1),L
2(6),L
2(2),L
2(6
:Line(L
2(5),L
2(3),L
2(5),L
2(4
:randInt(1,4→Q
:If Q≠1:Then
:¦ L
2(1)+WrandInt(0,‾1+(L
2(5)-L
2(1))/W
:¦ Line(Ans+1,L
2(6),Ans+W-1,L
2(6),0
:End
:If Q≠2:Then
:¦ L
2(5)+WrandInt(0,‾1+(L
2(2)-L
2(5))/W
:¦ Line(Ans+1,L
2(6),Ans+W-1,L
2(6),0
:End
:If Q≠3:Then
:¦ L
2(3)+WrandInt(0,‾1+(L
2(6)-L
2(3))/W
:¦ Line(L
2(5),Ans+1,L
2(5),Ans+W-1,0
:End
:If Q≠4:Then
:¦ L
2(6)+WrandInt(0,‾1+(L
2(4)-L
2(6))/W
:¦ Line(L
2(5),Ans+1,L
2(5),Ans+W-1,0
:End
:{L
2(1),L
2(5),L
2(3),L
2(6)→L
1
:If Ans(2)-Ans(1)>W and Ans(4)-Ans(3)>W
:prgmZMAZE
:{L
2(1),L
2(5),L
2(6),L
2(4)→L
1
:If Ans(2)-Ans(1)>W and Ans(4)-Ans(3)>W
:prgmZMAZE
:{L
2(5),L
2(2),L
2(3),L
2(6)→L
1
:If Ans(2)-Ans(1)>W and Ans(4)-Ans(3)>W
:prgmZMAZE
:{L
2(5),L
2(2),L
2(6),L
2(4)→L
1
:If Ans(2)-Ans(1)>W and Ans(4)-Ans(3)>W
:prgmZMAZE
:For(X,6,1,‾1
:¦ sum(15
:¦ Ans→L
2(X
:End
Generated by
SourceCoder, © 2005-2010
Cemetech
player_1537, that's where I messed up too. I also was in the process of looking at another variation and trying iterative things too. Anyway, this is excellent, Kerm, and I am sorry that I wasn't able to do it.
c.sprinkle wrote:
player_1537, that's where I messed up too. I also was in the process of looking at another variation and trying iterative things too. Anyway, this is excellent, Kerm, and I am sorry that I wasn't able to do it.
No need to be sorry; I enjoyed writing this. I haven't written any serious TI-BASIC since my DCSB Libs demo apps in July or August, so it was nice to give it a go once again.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
»
Go to Registration page
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum