<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Maze Questions</title>
		<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions</link>
		<description>Posts in the discussion thread &quot;Maze Questions&quot; - This thread exists because I have a few questions I&#039;d like to ask concerning my maze thingy thingy. I&#039;m not sure this thread is in the perfect place, but oh well.</description>
				<copyright></copyright>
		<lastBuildDate>Wed, 13 May 2026 04:07:35 +0000</lastBuildDate>
		
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-98652</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-98652</link>
				<description></description>
				<pubDate>Tue, 29 Jan 2008 00:43:42 +0000</pubDate>
				<wikidot:authorName>Acro</wikidot:authorName>				<wikidot:authorUserId>70704</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>i fixed that part and it works!</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-98558</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-98558</link>
				<description></description>
				<pubDate>Mon, 28 Jan 2008 21:28:02 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Yeah, you shouldn't be able to get a value of 18 for X. If you look at these two lines in the movement program code I posted</p> <div class="code"> <pre><code>:randInt(1,8→Y :randInt(1,16→X</code></pre></div> <p>are they the same in your program? I bet you probably have randInt(1,18→X</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-98545</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-98545</link>
				<description></description>
				<pubDate>Mon, 28 Jan 2008 21:09:10 +0000</pubDate>
				<wikidot:authorName>Acro</wikidot:authorName>				<wikidot:authorUserId>70704</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Y gave me a 2 and X gave me 18. I take it that's bad.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-98475</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-98475</link>
				<description></description>
				<pubDate>Mon, 28 Jan 2008 18:52:21 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Are you using a matrix with dimensions 8 by 16?</p> <p>When If [A](Y,X:Then gives you the invalid dim error, choose the Quit option in the error menu. On the home screen, type the variable Y and press ENTER. What value does it give you? Now type the variable X and press ENTER. What value does that give you?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-98469</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-98469</link>
				<description></description>
				<pubDate>Mon, 28 Jan 2008 18:44:11 +0000</pubDate>
				<wikidot:authorName>Acro</wikidot:authorName>				<wikidot:authorUserId>70704</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>No, no, you asked what my Y and X values-<br /> Oooh. I meant 8 by 16, i read your Y and X as X and Y.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-98436</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-98436</link>
				<description></description>
				<pubDate>Mon, 28 Jan 2008 17:50:02 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>There's your problem right there. A matrix is accessed {row,column}, which means you probably have your variables backwards.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-98428</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-98428</link>
				<description></description>
				<pubDate>Mon, 28 Jan 2008 17:34:02 +0000</pubDate>
				<wikidot:authorName>Acro</wikidot:authorName>				<wikidot:authorUserId>70704</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>They're 16 by 8, respectively.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-98417</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-98417</link>
				<description></description>
				<pubDate>Mon, 28 Jan 2008 17:13:45 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>What are the values of Y and X when that happens? Are they within the appropriate range?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-98397</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-98397</link>
				<description></description>
				<pubDate>Mon, 28 Jan 2008 16:34:02 +0000</pubDate>
				<wikidot:authorName>Acro</wikidot:authorName>				<wikidot:authorUserId>70704</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Okay. I edited my code, started the level up. It loaded, I moved one space, then it gave me an INVALID DIM error, highlighting the colon in</p> <div class="code"> <pre><code>:If [A](Y,X:Then</code></pre></div> <p>Bout other than that, everything checks out. Thanks.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-98163</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-98163</link>
				<description></description>
				<pubDate>Mon, 28 Jan 2008 05:57:23 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I understand now. The reason that the numbers don't disappear and reappear is because the random wall movement code isn't inside the Repeat loop:</p> <div class="code"> <pre><code>:4→A:8→B :[[matrix]]→[A] :For(Y,1,8 :For(X,1,16 :If Ans(Y,X :Output(Y,X,1 :End:End :Repeat 30=abs(K-75 :getKey→K :If max(Ans={24,25,26,34 :Output(A,B,&quot; :A-(Ans=25 and A&gt;1 and not([A](A-(A&gt;1),B)))+(Ans=34 and A&lt;8 and not([A](A+(A&lt;8),B→A :B-(K=24 and B&gt;1 and not([A](A,B-(B&gt;1))))+(K=26 and B&lt;16 and not([A](A,B+(B&lt;16→B :Output(A,Ans,&quot;X :randInt(1,8→Y :randInt(1,16→X :If [A](Y,X:Then :randInt(1,8→S :randInt(1,16→T :If not([A](S,T:Then :Output(S,T,&quot;S :1→[A](S,T :Output(Y,X,&quot; (1 space) :0→[A](Y,X :End:End :End</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-98161</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-98161</link>
				<description></description>
				<pubDate>Mon, 28 Jan 2008 05:44:21 +0000</pubDate>
				<wikidot:authorName>Acro</wikidot:authorName>				<wikidot:authorUserId>70704</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Its the same code, but&#8230; oh crap! I totally forgot:</p> <div class="code"> <pre><code>:4→A:8→B :[[matrix]]→[A] :randInt(1,8→Y :randInt(1,16→X :If [A](Y,X:Then :randInt(1,8→S :randInt(1,16→T :If not([A](S,T:Then :1→[A](S,T :0→[A](Y,X :End:End :For(Y,1,8 :For(X,1,16 :If Ans(Y,X :Output(Y,X,1 :End:End :Repeat 30=abs(K-75 :getKey→K :If max(Ans={24,25,26,34 :Output(A,B,&quot; :A-(Ans=25 and A&gt;1 and not([A](A-(A&gt;1),B)))+(Ans=34 and A&lt;8 and not([A](A+(A&lt;8),B→A :B-(K=24 and B&gt;1 and not([A](A,B-(B&gt;1))))+(K=26 and B&lt;16 and not([A](A,B+(B&lt;16→B :Output(A,Ans,&quot;X :End</code></pre></div> <p>Sorry&#8230; :(</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-98151</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-98151</link>
				<description></description>
				<pubDate>Mon, 28 Jan 2008 05:11:27 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>What numbers are you talking about? You can't walk through the walls (the 1's), so those should never disappear. It sounds like your code is different than what you posted, and if that's the case, I would like you to post your code.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-98123</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-98123</link>
				<description></description>
				<pubDate>Mon, 28 Jan 2008 03:49:56 +0000</pubDate>
				<wikidot:authorName>Acro</wikidot:authorName>				<wikidot:authorUserId>70704</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>The numbers don't disappear and reappear.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-98092</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-98092</link>
				<description></description>
				<pubDate>Mon, 28 Jan 2008 01:48:40 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>So, you don't have any problems with the program?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-98087</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-98087</link>
				<description></description>
				<pubDate>Mon, 28 Jan 2008 01:31:48 +0000</pubDate>
				<wikidot:authorName>Acro</wikidot:authorName>				<wikidot:authorUserId>70704</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Mmkay.. Oops! That's what it is in the program.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-98075</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-98075</link>
				<description></description>
				<pubDate>Mon, 28 Jan 2008 00:42:49 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Well, that's the code from the movement page, and I know that works. The only thing I can think is that you could try changing If Ans(Y,X to be If [A](Y,X.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-98050</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-98050</link>
				<description></description>
				<pubDate>Sun, 27 Jan 2008 23:16:20 +0000</pubDate>
				<wikidot:authorName>Acro</wikidot:authorName>				<wikidot:authorUserId>70704</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Yessir.</p> <div class="code"> <pre><code>:ClrHome :4→A:8→B :[[Matrix]]→[A] :For(Y,1,8 :For(X,1,16 :If Ans(Y,X :Output(Y,X,1 :End:End :Repeat 30=abs(K-75 :getKey→K :If max(Ans={24,25,26,34 :Output(A,B,&quot; // 1 space :A-(Ans=25 and A&gt;1 and not([A](A-(A&gt;1),B)))+(Ans=34 and A&lt;8 and not([A](A+(A&lt;8),B→A :B-(K=24 and B&gt;1 and not([A](A,B-(B&gt;1))))+(K=26 and B&lt;16 and not([A](A,B+(B&lt;16→B :Output(A,Ans,&quot;X :End</code></pre></div> <p>That's precisly what it looks like now.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-98027</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-98027</link>
				<description></description>
				<pubDate>Sun, 27 Jan 2008 22:31:30 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>The problem is that I don't know what your current code looks like. If you can, could you please post it in its entirety?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-98013</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-98013</link>
				<description></description>
				<pubDate>Sun, 27 Jan 2008 21:59:56 +0000</pubDate>
				<wikidot:authorName>Acro</wikidot:authorName>				<wikidot:authorUserId>70704</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>So i just keep it as Ans, then?</p> <p>Edit: I changed it to Ans, gave me a data type error on</p> <div class="code"> <pre><code>A-(Ans=25 and A&gt;1 and not([A](A-(A&gt;1),B)))+(Ans=34 and A&lt;8 and not([A](A+(A&lt;8),B→A</code></pre></div> <p>The Ans was changed to [A], and that was what was highlighted. I then changed that back to Ans. Then it highlighted the [A] (ans below) in</p> <div class="code"> <pre><code>:Output(A,Ans,&quot;X</code></pre></div> <p>So i changed that to Ans as well. Now, it just a the character moving through the maze without any crazy walls or anything. :(</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-98002</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-98002</link>
				<description></description>
				<pubDate>Sun, 27 Jan 2008 21:33:05 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>The max(Ans={24,25,26,34 goes with the getKey→K on the line before it. max(Ans={24,25,26,34 is an optimized way of checking for the four arrow keys. The reason that it's giving you a <a href="http://tibasicdev.wikidot.com/errors#datatype">DATA TYPE</a> error is because you can't multiply a matrix by a list. You can, however, multiply individual elements of a matrix by a list, but that's something completely different.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-97998</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-97998</link>
				<description></description>
				<pubDate>Sun, 27 Jan 2008 21:27:24 +0000</pubDate>
				<wikidot:authorName>Acro</wikidot:authorName>				<wikidot:authorUserId>70704</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>So what does that error mean? I can't see a problem with</p> <div class="code"> <pre><code>:If max([A]{24,25,26,34</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-97658</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-97658</link>
				<description></description>
				<pubDate>Sat, 26 Jan 2008 20:21:28 +0000</pubDate>
				<wikidot:authorName>Acro</wikidot:authorName>				<wikidot:authorUserId>70704</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Oke-doke. Thanks!</p> <p>edit: I replaced all the Ans with the first level's matrix, and I got a DATA TYPE error right at the end of</p> <p>:If max(Ans={24,25,26,34</p> <p>Of course, the Ans is actually matrix [A].</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-97633</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-97633</link>
				<description></description>
				<pubDate>Sat, 26 Jan 2008 19:12:40 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Yeah, that's what I'm saying.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-97630</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-97630</link>
				<description></description>
				<pubDate>Sat, 26 Jan 2008 19:10:50 +0000</pubDate>
				<wikidot:authorName>Acro</wikidot:authorName>				<wikidot:authorUserId>70704</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>So I would use the level matrix as the Ans substitute? Is that wot yer saying?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-97624</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-97624</link>
				<description></description>
				<pubDate>Sat, 26 Jan 2008 18:45:40 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>That Ans is referring to the <a href="http://tibasicdev.wikidot.com/matrices">matrix</a> variable, so you would just use that instead of Ans.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-97622</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-97622</link>
				<description></description>
				<pubDate>Sat, 26 Jan 2008 18:42:38 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Acro here&#8212; too lazy to sign in.</p> <p>Now, when I inputted burr's</p> <div class="code"> <pre><code>:randInt(1,8→Y :randInt(1,16→X :If [B](Y,X:Then :randInt(1,8→S :randInt(1,16→T :If not([B](S,T:Then :1→[B](S,T :0→[B](Y,X :End:End</code></pre></div> <p>after the level matrix and before the actual collision detection code I used</p> <div class="code"> <pre><code>:For(Y,1,8 :For(X,1,16 :If Ans(Y,X :Output(Y,X,1 :End:End :Repeat 30=abs(K-75 :getKey→K :If max(Ans={24,25,26,34 :Output(A,B,&quot; // 1 space :A-(Ans=25 and A&gt;1 and not([A](A-(A&gt;1),B)))+(Ans=34 and A&lt;8 and not([A](A+(A&lt;8),B→A :B-(K=24 and B&gt;1 and not([A](A,B-(B&gt;1))))+(K=26 and B&lt;16 and not([A](A,B+(B&lt;16→B :Output(A,Ans,&quot;X :End</code></pre></div> <p>The</p> <div class="code"> <pre><code>:If Ans(Y,X</code></pre></div> <p>was giving me a syntax error. I was reading one of hedidit's posts, and he was talking out how the Ans have to go.</p> <p>So, do they just go, or are they replaced?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-97617</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-97617</link>
				<description></description>
				<pubDate>Sat, 26 Jan 2008 18:28:15 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Yeah, you're right. I wrote that post right before bed, and didn't bother checking the code on my calculator &#8212; that's the laziness in me :D</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-97612</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-97612</link>
				<description></description>
				<pubDate>Sat, 26 Jan 2008 18:14:53 +0000</pubDate>
				<wikidot:authorName>DarkerLine</wikidot:authorName>				<wikidot:authorUserId>961</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Your random number generating code in the last example is off &#8212; it's generating numbers 1-9 and 1-17 instead of 1-8 and 1-16.</p> <p>To go even further:</p> <div class="code"> <pre><code>:1+int({8,16,8,16}rand(4→L1 :[B](Ans(1),Ans(2→T :[B](L1(3),L1(4→[B](L1(1),L1(2 :T→[B](L1(3),L1(4)</code></pre></div> <p>For the record, it's not self-modifying code if it doesn't self-modify. That's just using an equation variable.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-97591</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-97591</link>
				<description></description>
				<pubDate>Sat, 26 Jan 2008 17:29:47 +0000</pubDate>
				<wikidot:authorName>Acro</wikidot:authorName>				<wikidot:authorUserId>70704</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Gotcha! Okay, that makes perfect sense. (the first one, not the one with the L1's&#8230; i'm not that great yet&#8230;)<br /> Thanks burr!</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-97480</guid>
				<title>Re: Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-97480</link>
				<description></description>
				<pubDate>Sat, 26 Jan 2008 06:08:45 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>First off, when you say you've stored each level as it's own matrix, are you talking about matrix variables (i.e., [A], [B], [C], etc.)? If that's what you're doing, I would recommend instead just storing each matrix value to the same variable:</p> <div class="code"> <pre><code>:If L=1:&lt;matrix code&gt; // level 1 :If L=2:&lt;matrix code&gt; // level 2 :If L=3:&lt;matrix code&gt; // level 3 :Ans→[B]</code></pre></div> <p>As for the second question, just try random locations, and once you have found an open spot (i.e., a zero), then store zero to the old spot and one to the new spot. It would be something like this (everything after the //'s is a comment):</p> <div class="code"> <pre><code>:randInt(1,8→Y // find random Y coordinate :randInt(1,16→X // find random X coordinate :If [B](Y,X:Then // the spot is a wall :randInt(1,8→S // find new random Y coordinate :randInt(1,16→T // find new random X coordinate :If not([B](S,T:Then // the new spot is empty :1→[B](S,T // set the new spot to a wall :0→[B](Y,X // set the old spot to empty :End:End</code></pre></div> <p>Note that you can optimize this code further using some more advanced concepts (in particular, <a href="http://tibasicdev.wikidot.com/selfmodify">self-modifying code</a> and <a href="http://tibasicdev.wikidot.com/ans">Ans</a>). This might be difficult to understand for you, but it's always nice to know about other ways to do things.</p> <div class="code"> <pre><code>:&quot;1+{int(9rand),int(17rand→u :u→L1:If [B](Ans(1),Ans(2:Then :u:If not([B](Ans(1),Ans(2):Then :1→[B](Ans(1),Ans(2 :0→[B](L1(1),L1(2 :End:End</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-37508#post-97405</guid>
				<title>Maze Questions</title>
				<link>http://tibasicdev.wikidot.com/forum/t-37508/maze-questions#post-97405</link>
				<description></description>
				<pubDate>Fri, 25 Jan 2008 23:19:32 +0000</pubDate>
				<wikidot:authorName>Acro</wikidot:authorName>				<wikidot:authorUserId>70704</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Okay. I have a simple, six-level maze game based off of the collision detection code from this site. I've stored each level as it's own matrix, and, following the making maps codes, have created the mazes on each level. As part of my question, I'm going to display the map for level 2 of my game.</p> <p>[[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]<br /> [1,0,0,0,0,0,0,0,0,0,1,0,0,0,1,1]<br /> [1,0,1,1,1,1,1,1,1,0,1,0,1,0,1,1]<br /> [1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,1]<br /> [1,0,1,0,0,0,1,0,1,0,1,0,1,0,0,0]<br /> [1,0,1,1,1,1,1,0,1,0,1,0,1,0,1,1]<br /> [1,0,0,0,0,0,0,0,1,0,0,0,1,0,1,1]<br /> [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 store [B]</p> <p>so. I was wondering. how could I make some 1's move around or maybe disappear and reappear? The only problem i can see is making it so that when a 1 disappears, the calculator doesn't try to read it as a 1 and not a 0.</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>