<?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>Optimize Me</title>
		<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me</link>
		<description>Posts in the discussion thread &quot;Optimize Me&quot;</description>
				<copyright></copyright>
		<lastBuildDate>Fri, 13 Mar 2026 05:04:19 +0000</lastBuildDate>
		
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-2064591</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-2064591</link>
				<description></description>
				<pubDate>Sun, 06 Jul 2014 11:45:28 +0000</pubDate>
				<wikidot:authorName>NikBanana!</wikidot:authorName>				<wikidot:authorUserId>1891680</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>:ClrHome<br /> :Output(1,1,&quot;MAKE YOUR WAY TOTHE EXIT WITHOUTGETTING CAUGHT..<br /> :Pause<br /> :DelVar Z3→C<br /> :While C<br /> :ClrHome<br /> :3→A:1→B<br /> :Repeat not(sum((A=L₁)(B=Ans<br /> :randInt(1,6,4→L₁<br /> :randInt(3,15,4→L₂<br /> :End<br /> :&quot;<span style="text-decoration: line-through;">-</span>&#8212;-<br /> :Output(7,1,Ans+Ans+&quot;PTS=<br /> :Output(8,5,Z<br /> :Output(3,16,&quot;&gt;<br /> :Repeat A=3 and B=16 or sum((A=L₁)(B=L₂<br /> :Output(8,17-C,&quot;+++<br /> :Repeat Ans<br /> :getKey→W<br /> :End<br /> :Output(A,B,&quot;<br /> :min(6,max(1,A+sum(△list(Ans={25,34→A<br /> :min(16,max(1,B+sum(△list(W={24,26→B<br /> :Output(A,Ans,&quot;+<br /> :For(θ,1,4<br /> :int(5rand→JFor(θ,1,4<br /> :Output(L₁(θ),L₂(θ),&quot;<br /> :min(6,max(1,Ans+sum(△list(J={0,2→L₁(θ<br /> :min(15,max(1,0+sum(△list(J={3,1→L₂(θ<br /> :Output(L₁(θ),Ans,&quot;*<br /> :End<br /> :End<br /> :B=16→D<br /> :C-not(Ans→C<br /> :Z+D→Z<br /> :End<br /> :ClrHome<br /> :Output(4,4,&quot;GAME OVER<br /> :Output(8,6,Z<br /> :Output(8,8,&quot;PTS<br /> :Pause</p> <p>I just mean</p> <p>For(θ,1,4<br /> :int(5rand→J<br /> :L₂(θ→O<br /> :L₁(θ<br /> :Output(Ans,O,&quot;<br /> :min(6,max(1,Ans+sum(△list(J={0,2→L₁(θ<br /> :min(15,max(1,0+sum(△list(J={3,1→L₂(θ<br /> :Output(L₁(θ),Ans,&quot;*<br /> :End</p> <p>Can be</p> <p>For(θ,1,4<br /> :int(5rand→J<br /> :Output(L₁(θ),L₂(θ),&quot;<br /> :min(6,max(1,Ans+sum(△list(J={0,2→L₁(θ<br /> :min(15,max(1,0+sum(△list(J={3,1→L₂(θ<br /> :Output(L₁(θ),Ans,&quot;*<br /> :End</p> <p>Not?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-613943</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-613943</link>
				<description></description>
				<pubDate>Wed, 21 Oct 2009 17:21:15 +0000</pubDate>
				<wikidot:authorName>jnesselr</wikidot:authorName>				<wikidot:authorUserId>142001</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Of course. What did you have in mind?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-613886</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-613886</link>
				<description></description>
				<pubDate>Wed, 21 Oct 2009 16:37:17 +0000</pubDate>
				<wikidot:authorName>Steelersfan1693</wikidot:authorName>				<wikidot:authorUserId>247053</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Am I allowed to reccomend something to be optimized.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-204488</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-204488</link>
				<description></description>
				<pubDate>Sat, 21 Jun 2008 10:37:55 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>None of us started out being good at optimization; the only way you are going to get better at it is lots of practice.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-202032</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-202032</link>
				<description></description>
				<pubDate>Thu, 19 Jun 2008 13:16:14 +0000</pubDate>
				<wikidot:authorName>Mapar007</wikidot:authorName>				<wikidot:authorUserId>143829</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>For now, I won't participate in optimizing contests and stuff. Optimizing is something I'm not good at, lol.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-202015</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-202015</link>
				<description></description>
				<pubDate>Thu, 19 Jun 2008 13:05:16 +0000</pubDate>
				<wikidot:authorName>basickevin</wikidot:authorName>				<wikidot:authorUserId>114819</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>k. Cool.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-199472</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-199472</link>
				<description></description>
				<pubDate>Wed, 18 Jun 2008 01:12:11 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>No, I did not. I saw it in a tutorial, and also saw DarkerLine use it.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-199129</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-199129</link>
				<description></description>
				<pubDate>Tue, 17 Jun 2008 20:21:32 +0000</pubDate>
				<wikidot:authorName>basickevin</wikidot:authorName>				<wikidot:authorUserId>114819</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>btw Burr, that thing with min and max is sweet. Did u discover that?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-198915</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-198915</link>
				<description></description>
				<pubDate>Tue, 17 Jun 2008 17:46:09 +0000</pubDate>
				<wikidot:authorName>basickevin</wikidot:authorName>				<wikidot:authorUserId>114819</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I played the game. it works great, just ask darkstone knight. :D</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-198765</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-198765</link>
				<description></description>
				<pubDate>Tue, 17 Jun 2008 15:06:39 +0000</pubDate>
				<wikidot:authorName>darkstone knight</wikidot:authorName>				<wikidot:authorUserId>141837</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p><span style="text-decoration: line-through;">yes, but max( is faster</span></p> <p>LOL</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-198723</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-198723</link>
				<description></description>
				<pubDate>Tue, 17 Jun 2008 14:30:52 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Does that really work for &quot;sum(△list(Ans={25,34&quot;?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-198716</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-198716</link>
				<description></description>
				<pubDate>Tue, 17 Jun 2008 14:25:09 +0000</pubDate>
				<wikidot:authorName>basickevin</wikidot:authorName>				<wikidot:authorUserId>114819</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>and since this is size optimization, you can use △list(!</p> <div class="code"> <pre><code>:min(6,max(1,A+sum(△list(Ans={25,34→A :min(16,max(1,B+sum(△list(W={24,26→B</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-198650</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-198650</link>
				<description></description>
				<pubDate>Tue, 17 Jun 2008 13:39:59 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>You can use the <a href="http://tibasicdev.wikidot.com/min">min(</a> and <a href="http://tibasicdev.wikidot.com/max">max(</a> commands:</p> <div class="code"> <pre><code>:min(8,max(1,A+(Ans=34)-(Ans=25→A :min(16,max(1,B+(W=26)-(W=24→B</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-198643</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-198643</link>
				<description></description>
				<pubDate>Tue, 17 Jun 2008 13:34:17 +0000</pubDate>
				<wikidot:authorName>basickevin</wikidot:authorName>				<wikidot:authorUserId>114819</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I've made a program smaller than darkerline's, and it works.:D 428 bytes.</p> <div class="code"> <pre><code>:ClrHome :Output(1,1,&quot;MAKE YOUR WAY TOTHE EXIT WITHOUTGETTING CAUGHT.. :Pause :DelVar Z3→C :While C :ClrHome :3→A:1→B :Repeat not(sum((A=L₁)(B=Ans :randInt(1,6,4→L₁ :randInt(3,15,4→L₂ :End :&quot;-------- :Output(7,1,Ans+Ans+&quot;PTS= :Output(8,5,Z :Output(3,16,&quot;&gt; :Repeat A=3 and B=16 or sum((A=L₁)(B=L₂ :Output(8,17-C,&quot;+++ :Repeat Ans :getKey→W :End :Output(A,B,&quot; :min(6,max(1,A+sum(△list(Ans={25,34→A :min(16,max(1,B+sum(△list(W={24,26→B :Output(A,Ans,&quot;+ :For(θ,1,4 :int(5rand→J :L₂(θ→O :L₁(θ :Output(Ans,O,&quot; :min(6,max(1,Ans+sum(△list(J={0,2→L₁(θ :min(15,max(1,0+sum(△list(J={3,1→L₂(θ :Output(L₁(θ),Ans,&quot;* :End :End :B=16→D :C-not(Ans→C :Z+D→Z :End :ClrHome :Output(4,4,&quot;GAME OVER :Output(8,6,Z :Output(8,8,&quot;PTS :Pause</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-171781</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-171781</link>
				<description></description>
				<pubDate>Mon, 26 May 2008 21:44:10 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Yeah, you're right. That's good thinking outside the box :D</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-171759</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-171759</link>
				<description></description>
				<pubDate>Mon, 26 May 2008 21:08:09 +0000</pubDate>
				<wikidot:authorName>GoVegan</wikidot:authorName>				<wikidot:authorUserId>35113</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>He's right, it does do the same thing. Just differently. Well done basickevin!</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-171706</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-171706</link>
				<description></description>
				<pubDate>Mon, 26 May 2008 19:50:23 +0000</pubDate>
				<wikidot:authorName>basickevin</wikidot:authorName>				<wikidot:authorUserId>114819</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>on another note, when I ran darkerline's program on my ti-83 +, it gave an error: domain message at<br /> :For(J,1,4<br /> :Output(L1(J),L2(J),&quot;*<br /> :End</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-171559</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-171559</link>
				<description></description>
				<pubDate>Mon, 26 May 2008 17:14:42 +0000</pubDate>
				<wikidot:authorName>basickevin</wikidot:authorName>				<wikidot:authorUserId>114819</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>yes it does, because the output command wraps text to the next line, which in this case is nonexisting, they do the same thing. I just ran them both on my calculator.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-171102</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-171102</link>
				<description></description>
				<pubDate>Mon, 26 May 2008 04:36:41 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>That doesn't do the same thing, though.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-171043</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-171043</link>
				<description></description>
				<pubDate>Mon, 26 May 2008 00:46:18 +0000</pubDate>
				<wikidot:authorName>basickevin</wikidot:authorName>				<wikidot:authorUserId>114819</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hey burr, when you are displaying the plus signs for hp, you can have a much simpler code than what you posted.<br /> Output(8,17-C,&quot;+++</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-102915</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-102915</link>
				<description></description>
				<pubDate>Wed, 06 Feb 2008 01:01:30 +0000</pubDate>
				<wikidot:authorName>DarkerLine</wikidot:authorName>				<wikidot:authorUserId>961</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>They are.</p> <p>On the 68k calcs, you can tell the way a command works in this respect by the name. If a command returns a value, it starts with a lowercase letter and uses parentheses. If a command doesn't return anything (and possibly modifies some variables), it starts with an uppercase letter and no parentheses.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-102874</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-102874</link>
				<description></description>
				<pubDate>Tue, 05 Feb 2008 23:40:31 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Are they the same way on the 68k calculators?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-102870</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-102870</link>
				<description></description>
				<pubDate>Tue, 05 Feb 2008 23:27:34 +0000</pubDate>
				<wikidot:authorName>DarkerLine</wikidot:authorName>				<wikidot:authorUserId>961</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Well, SortA and SortD are special since they use an in-place sorting algorithm to allow you to sort 999-element lists. If they were to return a value, as you suggest, rather than modify an existing list, you'd run out of memory in that case.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-102864</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-102864</link>
				<description></description>
				<pubDate>Tue, 05 Feb 2008 23:03:17 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>It looks like you did a good job :D It's too bad that TI-Basic doesn't allow chaining of commands, that would be really helpful in optimizing:</p> <div class="code"> <pre><code>:randInt(18,95,4→L3 :SortA(L3 could be :SortA(randInt(18,95,4→L3</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-102851</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-102851</link>
				<description></description>
				<pubDate>Tue, 05 Feb 2008 22:43:39 +0000</pubDate>
				<wikidot:authorName>DarkerLine</wikidot:authorName>				<wikidot:authorUserId>961</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Here's my optimized version, which might be a little larger than it should be in places I was showing off.</p> <div class="code"> <pre><code>:ClrHome :Disp &quot;MAKE YOUR WAY TO&quot;,&quot;THE EXIT WITHOUT :Pause &quot;GETTING CAUGHT.. :3→C :0→Z :While 1 :ClrHome :3→A :1→B :Repeat min(ΔList(Ans :randInt(18,95,4→L3 :SortA(L3 :End :int(Ans/6→L2 :1+L3-6Ans→L1 :Output(7,1,&quot;----------------PTS= :Output(8,5,Z :Output(8,14,sub(&quot; +++&quot;,C,3 :Output(3,16,&quot;&gt; :Repeat max(A=L1 and B=L2 or Ans :Output(A,B,&quot;+ :For(J,1,4 :Output(L1(J),L2(J),&quot;* :End :Repeat Ans :getKey→K :End :Output(A,B,&quot;(space) :A+(K=34 and A&lt;6)-(K=25 and A&gt;1→A :B+(K=26 and B&lt;16)-(K=24 and B&gt;1→B :randInt(1,5,4→L3 :For(J,1,4 :Output(L1(J),L2(J),&quot;(space) :End :L1+(Ans=1 and L1&lt;6)-(Ans=2 and L1&gt;1→L1 :L2+(L3=3 and L2&lt;15)-(L3=4 and L2&gt;1→L2 :A=3 and B=16 :End :If Ans :IS&gt;(Z,0 :DS&lt;(C,1 :End :ClrHome :Disp &quot;GAME OVER&quot;,&quot;POINTS: :Z</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-102432</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-102432</link>
				<description></description>
				<pubDate>Tue, 05 Feb 2008 04:35:41 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Thanks for telling me about the closing parentheses on the second line. I didn't even notice that. I actually found this game on the Internet, and just posted it verbatim; I didn't make any changes whatsoever.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-102430</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-102430</link>
				<description></description>
				<pubDate>Tue, 05 Feb 2008 04:29:54 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>You can use <a href="http://tibasicdev.wikidot.com/ans">Ans</a> for repeated strings.</p> <div class="code"> <pre><code>:Output(7,1,&quot;---------------- can be :&quot;---- :Output(7,1,Ans+Ans+Ans+Ans</code></pre></div> <p>Here you can store all of the characters in a <a href="http://tibasicdev.wikidot.com/strings">string</a> and use the <a href="http://tibasicdev.wikidot.com/sub">sub(</a> command.</p> <div class="code"> <pre><code>:If C=3 :Output(8,14,&quot;+++ :If C=2 :Output(8,15,&quot;++ :If C=1 :Output(8,16,&quot;+ can be :Output(8,17-C,sub(&quot;+++&quot;,1,C</code></pre></div> <p>Everybody should recognize the <a href="http://tibasicdev.wikidot.com/movement">movement</a> code, and the subsequent optimization.</p> <div class="code"> <pre><code>:Repeat Ans :getKey→Y :End :Output(A,B,&quot; (one space) :B+(Y=26 and B&lt;16)-(Y=24 and B&gt;1→B :A+(Y=34 and A&lt;6)-(Y=25 and A&gt;1→A</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-102421</guid>
				<title>Re: Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-102421</link>
				<description></description>
				<pubDate>Tue, 05 Feb 2008 04:03:36 +0000</pubDate>
				<wikidot:authorName>Xphoenix</wikidot:authorName>				<wikidot:authorUserId>15004</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>That's scary large o.O<br /> It doesn't even run, you have a simple extra parenthesis on the second line.</p> <div class="code"> <pre><code>:ClrHome :Output(1,1,&quot;MAKE YOUR WAY TOTHE EXIT WITHOUTGETTING CAUGHT.. :Pause :DelVar Z3→C :Lbl A :ClrHome :3→A :1→B :1+int(6rand→D :3+int(13rand→E :Repeat F≠D or G≠E :1+int(6rand→F :3+int(13rand→G :End :Repeat H≠D or I≠E and H≠F or I≠G :1+int(6rand→H :3+int(13rand→I :End :Repeat N≠D or O≠E and N≠F or O≠G and N≠H or O≠I :1+int(6rand→H :3+int(13rand→I :End :Output(7,1,&quot;----------------PTS= // (use 16 minus signs) :Output(8,5,Z :If C=3 :Output(8,14,&quot;+++ :If C=2 :Output(8,15,&quot;++ :If C=1 :Output(8,16,&quot;+ :Output(A,B,&quot;+ :Output(3,16,&quot;&gt; :&quot;* :Output(D,E,Ans :Output(F,G,Ans :Output(H,I,Ans :Output(N,O,Ans :Lbl 0 :getKey→Y :Repeat Y :getKey→Y :End :If Y=24 and B≠1 :Then :Output(A,B,&quot;&lt;one space&gt; :B-1→B :End :If Y=25 and A≠1 :Then :Output(A,B,&quot;&lt;one space&gt; :A-1→A :End :If Y=26 and B≠16 :Then :Output(A,B,&quot;&lt;one space&gt; :B+1→B :End :If Y=34 and A≠6 :Then :Output(A,B,&quot;&lt;one space&gt; :A+1→A :End :Lbl 1 :1+int(5rand→J :If Ans=1 and D&gt;1 :Then :Output(D,E,&quot;&lt;one space&gt; :D-1→D :End :If J=2 and E&lt;15 :Then :Output(D,E,&quot;&lt;one space&gt; :E+1→E :End :If J=3 and D&lt;6 :Then :Output(D,E,&quot;&lt;one space&gt; :D+1→D :End :If J=4 and E&gt;1 :Then :Output(D,E,&quot;&lt;one space&gt; :E-1→E :End :1+int(5rand→K :If Ans=1 and F&gt;1 :Then :Output(F,G,&quot;&lt;one space&gt; :F-1→F :End :If K=2 and G&lt;15 :Then :Output(F,G,&quot;&lt;one space&gt; :G+1→G :End :If K=3 and F&lt;6 :Then :Output(F,G,&quot;&lt;one space&gt; :F+1→F :End :If K=4 and G&gt;1 :Then :Output(F,G,&quot;&lt;one space&gt; :G-1→G :End :1+int(5rand→L :If L=1 and H :Then :Output(H,I,&quot;&lt;one space&gt; :H-1→H :End :If L=2 and I&lt;15 :Then :Output(H,I,&quot;&lt;one space&gt; :I+1→I :End :If L=3 and H&lt;6 :Then :Output(H,I,&quot;&lt;one space&gt; :H+1→H :End :If L=4 and I&gt;1 :Then :Output(H,I,&quot;&lt;one space&gt; :I-1→I :End :1+int(5rand→M :If M=1 and N&gt;1 :Then :Output(N,O,&quot;&lt;one space&gt; :N-1→N :End :If M=2 and O&lt;15 :Then :Output(N,O,&quot;&lt;one space&gt; :O+1→O :End :If M=3 and N&lt;6 :Then :Output(N,O,&quot;&lt;one space&gt; :N+1→N :End :If M=4 and O&gt;1 :Then :Output(N,O,&quot;&lt;one space&gt; :O-1→O :End :Lbl 2 :Output(A,B,&quot;+ :&quot;* :Output(D,E,&quot;Ans :Output(F,G,&quot;Ans :Output(H,I,&quot;Ans :Output(N,O,&quot;Ans :If A=D and B=E or A=F and B=G or A=H and B=I or A=N and B=O :Goto 99 :If A≠3 or B≠16 :Goto 0 :Z+1→Z :Goto A :Lbl 99 :C-1→C :If C≥1 :Goto A :ClrHome :Output(4,4,&quot;GAME OVER :Output(8,2,&quot;PTS = :Output(8,7,Z</code></pre></div> <p>That's what I have so far, I'm posting so it's saved, then I'll continue later. The structure sucks, if I get it working in a program,I might rewrite it :P</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-39362#post-101826</guid>
				<title>Optimize Me</title>
				<link>http://tibasicdev.wikidot.com/forum/t-39362/optimize-me#post-101826</link>
				<description></description>
				<pubDate>Mon, 04 Feb 2008 05:28:14 +0000</pubDate>
				<wikidot:authorName>burr</wikidot:authorName>				<wikidot:authorUserId>740</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>As requested by <a href="http://tibasicdev.wikidot.com/forum/t-17557/projects" target="_blank">Socks</a>, the goal of this contest is to optimize a program as much as possible. The optimizations can either be for speed or size (or both), with that decision left up to the person who posted the program. Once everybody feels that a program can't be optimized any further, somebody can post a new program. When posting a program, please remember to change all of the TI-Basic tokens that don't display correctly to Unicode or something recognizable (see <a href="http://tibasicdev.wikidot.com/template:characters">characters</a> for a list of characters).</p> <p>I'll start us off with a <em>very</em> unoptimized program, and the goal is to optimize for size.</p> <div class="code"> <pre><code>:ClrHome :Disp &quot;MAKE YOUR WAY TO&quot;,&quot;THE EXIT WITHOUT&quot;,&quot;GETTING CAUGHT..&quot; :Pause :3→C :0→Z :Lbl A :ClrHome :3→A :1→B :randInt(1,6)→D :randInt(3,15)→E :Lbl B :randInt(1,6)→F :randInt(3,15)→G :If F=D and G=E :Goto B :Lbl C :randInt(1,6)→H :randInt(3,15)→I :If H=D and I=E :Goto C :If H=F and I=G :Goto C :Lbl D :randInt(1,6)→N :randInt(3,15)→O :If N=D and O=E :Goto D :If N=F and O=G :Goto D :If N=H and O=I :Goto D :Output(7,1,&quot;----------------&quot;) (use 16 minus signs) :Output(8,1,&quot;PTS=&quot;) :Output(8,5,Z) :If C=3 :Output(8,14,&quot;+++&quot;) :If C=2 :Output(8,15,&quot;++&quot;) :If C=1 :Output(8,16,&quot;+&quot;) :Output(A,B,&quot;+&quot;) :Output(3,16,&quot;&gt;&quot;) :Output(D,E,&quot;*&quot;) :Output(F,G,&quot;*&quot;) :Output(H,I,&quot;*&quot;) :Output(N,O,&quot;*&quot;) :Lbl 0 :getKey→Y :While Y=0 :getKey→Y :End :If Y=24 and B≠1 :Then :Output(A,B,&quot; &quot;) (put 1 space between the mark) :B-1→B :End :If Y=25 and A≠1 :Then :Output(A,B,&quot; &quot;) :A-1→A :End :If Y=26 and B≠16 :Then :Output(A,B,&quot; &quot;) :B+1→B :End :If Y=34 and A≠6 :Then :Output(A,B,&quot; &quot;) :A+1→A :End :Lbl 1 :randInt(1,5)→J :If J=1 and D&gt;1 :Then :Output(D,E,&quot; &quot;) :D-1→D :End :If J=2 and E&lt;15 :Then :Output(D,E,&quot; &quot;) :E+1→E :End :If J=3 and D&lt;6 :Then :Output(D,E,&quot; &quot;) :D+1→D :End :If J=4 and E&gt;1 :Then :Output(D,E,&quot; &quot;) :E-1→E :End :randInt(1,5)→K :If K=1 and F&gt;1 :Then :Output(F,G,&quot; &quot;) :F-1→F :End :If K=2 and G&lt;15 :Then :Output(F,G,&quot; &quot;) :G+1→G :End :If K=3 and F&lt;6 :Then :Output(F,G,&quot; &quot;) :F+1→F :End :If K=4 and G&gt;1 :Then :Output(F,G,&quot; &quot;) :G-1→G :End :randInt(1,5)→L :If L=1 and H&gt;1 :Then :Output(H,I,&quot; &quot;) :H-1→H :End :If L=2 and I&lt;15 :Then :Output(H,I,&quot; &quot;) :I+1→I :End :If L=3 and H&lt;6 :Then :Output(H,I,&quot; &quot;) :H+1→H :End :If L=4 and I&gt;1 :Then :Output(H,I,&quot; &quot;) :I-1→I :End :randInt(1,5)→M :If M=1 and N&gt;1 :Then :Output(N,O,&quot; &quot;) :N-1→N :End :If M=2 and O&lt;15 :Then :Output(N,O,&quot; &quot;) :O+1→O :End :If M=3 and N&lt;6 :Then :Output(N,O,&quot; &quot;) :N+1→N :End :If M=4 and O&gt;1 :Then :Output(N,O,&quot; &quot;) :O-1→O :End :Lbl 2 :Output(A,B,&quot;+&quot;) :Output(D,E,&quot;*&quot;) :Output(F,G,&quot;*&quot;) :Output(H,I,&quot;*&quot;) :Output(N,O,&quot;*&quot;) :If A=D and B=E :Goto 99 :If A=F and B=G :Goto 99 :If A=H and B=I :Goto 99 :If A=N and B=O :Goto 99 :If A=3 and B=16 :Goto 98 :Goto 0 :Lbl 98 :Z+1→Z :Goto A :Lbl 99 :C-1→C :If C&lt;1 :Goto 97 :Goto A :Lbl 97 :ClrHome :Output(4,4,&quot;GAME OVER&quot;) :Output(8,2,&quot;PTS =&quot;) :Output(8,7,Z) :Stop</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>