<?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 #5</title>
		<link>http://tibasicdev.wikidot.com/forum/t-108984/optimize-me-5</link>
		<description>Posts in the discussion thread &quot;Optimize me #5&quot;</description>
				<copyright></copyright>
		<lastBuildDate>Sat, 07 Mar 2026 11:57:30 +0000</lastBuildDate>
		
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-108984#post-2166646</guid>
				<title>(no title)</title>
				<link>http://tibasicdev.wikidot.com/forum/t-108984/optimize-me-5#post-2166646</link>
				<description></description>
				<pubDate>Wed, 26 Nov 2014 14:02:18 +0000</pubDate>
				<wikidot:authorName>wowaname</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <div class="code"> <pre><code>L-(Ans=24)(L&gt;1)→L L+(Ans=26)(L&lt;7)→L</code></pre></div> <br /> can be simplified to <div class="code"> <pre><code>L-(Ans=24)(L&gt;1)+(Ans=26)(L&lt;7)→L</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-108984#post-358611</guid>
				<title>Re: Optimize me #5</title>
				<link>http://tibasicdev.wikidot.com/forum/t-108984/optimize-me-5#post-358611</link>
				<description></description>
				<pubDate>Fri, 16 Jan 2009 18:45:43 +0000</pubDate>
								<wikidot:authorUserId>158910</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>wow, quite a lot If-tenses.<br /> never heard of boolean?<br /> example:<br /> instead of using this:</p> <div class="code"> <pre><code>If Ans=24 and L&gt;1 L-1→L</code></pre></div> <p>use this:</p> <div class="code"> <pre><code>L-(And=24)(L&gt;1)→L</code></pre></div> <p>ok, second thing:</p> <div class="code"> <pre><code>While K≠105 Output(2,7,L Repeat Ans // custom input routine replaces labels with a level number... getKey→K // maybe just use Prompt? End If Ans=24 and L&gt;1 L-1→L If Ans=26 and L&lt;7 L+1→L End</code></pre></div> <br /> this is shorter: <div class="code"> <pre><code>While Ans≠105 Output(2,7,L L-(Ans=24)(L&gt;1)→L L+(Ans=26)(L&lt;7)→L GetKey End</code></pre></div> <br /> or Output destroys Ans in some kind of way?i dont know for sure. <p>+EDIT</p> <div class="code"> <pre><code>:int(10rand)→A :int(10rand)→B :int(10rand)→C :int(10rand)→D :int(10rand)→F :int(10rand)→G</code></pre></div> <br /> maybe you should work with lists seeing this. <p>these are just 'standard' optimize thingys,<br /> what does this game do? :P</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-108984#post-356683</guid>
				<title>Re: Optimize me #5</title>
				<link>http://tibasicdev.wikidot.com/forum/t-108984/optimize-me-5#post-356683</link>
				<description></description>
				<pubDate>Wed, 14 Jan 2009 23:14:48 +0000</pubDate>
				<wikidot:authorName>Timothy Foster</wikidot:authorName>				<wikidot:authorUserId>197988</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 The game is to use the numbers above the answer in an arrangement of operations to create the answer. The user could technically just enter C, but then that means they lose the point of the game. The challenge only comes when you try. And besides, this was my first game program, so it isn't too great anyway.<br /> <a href="http://tarm.wikidot.com"><img src="http://tarm.wdfiles.com/local--files/start/tarmsig.png" style="border-top:1px solid #777; padding-top:3px;margin-top:1em;" alt="tarmsig.png" class="image" /></a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-108984#post-356674</guid>
				<title>Re: Optimize me #5</title>
				<link>http://tibasicdev.wikidot.com/forum/t-108984/optimize-me-5#post-356674</link>
				<description></description>
				<pubDate>Wed, 14 Jan 2009 23:09:57 +0000</pubDate>
				<wikidot:authorName>crabbb622</wikidot:authorName>				<wikidot:authorUserId>268052</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>wait&#8230;<br /> i'm confused about the point of the game</p> <p>couldn't the person just enter whatever C is?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-108984#post-327233</guid>
				<title>Re: Optimize me #5</title>
				<link>http://tibasicdev.wikidot.com/forum/t-108984/optimize-me-5#post-327233</link>
				<description></description>
				<pubDate>Fri, 05 Dec 2008 06:14:11 +0000</pubDate>
				<wikidot:authorName>Xphoenix</wikidot:authorName>				<wikidot:authorUserId>15004</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <div class="code"> <pre><code>Lbl MM DelVar KClrHome Disp &quot;EQUATION GAME!&quot;,&quot;LEVEL 1→L While K≠105 Output(2,7,L Repeat Ans // custom input routine replaces labels with a level number... getKey→K // maybe just use Prompt? End If Ans=24 and L&gt;1 L-1→L If Ans=26 and L&lt;7 L+1→L End Lbl G {0,0,0,-10,0,0→L2 // referenced later based on level {9,19,9,9,19,9→L3 // possible that it would be easier to use If/Then because of so many repeated values Disp &quot;NUMBERS For(I,1,2+(L=3 // smaller without For( loop? If L&lt;7 Disp randInt(L2(L),L2(L If L=7 Disp int(10rand)+i*int(10rand // that's the imaginary i, not the letter, remove the multiply sign when entering on calculator End If L=7 Disp 2 If L=6 and rand&gt;.5 Then Disp &quot;USE ONLY +-*/^\ Else Disp &quot;USE ONLY +-()√( End Disp &quot;ANSWER If L&lt;5 or L=6 randInt(L2(L),L(L→D If L=5 500rand→D If L=7 10rand+i*10rand→D // same here Disp int(D),&quot;EQUATION? Prompt E If imag(E)=imag(D) and real(E)=real(D Then &quot;YOU WIN! Else &quot;YOU LOSE! End Pause Ans Menu(&quot;SELECT&quot;,&quot;AGAIN&quot;,G,&quot;CHANGE LEVEL&quot;,MM,&quot;QUIT&quot;,Q Lbl Q</code></pre></div> <br /> It's clearly smaller, but it can definitely be shrunk more. Also, I haven't actually tested it&#8230;
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-108984#post-321909</guid>
				<title>Re: Optimize me #5</title>
				<link>http://tibasicdev.wikidot.com/forum/t-108984/optimize-me-5#post-321909</link>
				<description></description>
				<pubDate>Sat, 29 Nov 2008 19:21:17 +0000</pubDate>
				<wikidot:authorName>patriotsfan</wikidot:authorName>				<wikidot:authorUserId>122803</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>You can also remove the unnecessary parentheses and quotation marks.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-108984#post-321554</guid>
				<title>Re: Optimize me #5</title>
				<link>http://tibasicdev.wikidot.com/forum/t-108984/optimize-me-5#post-321554</link>
				<description></description>
				<pubDate>Sat, 29 Nov 2008 02:51:06 +0000</pubDate>
				<wikidot:authorName>rhombus p</wikidot:authorName>				<wikidot:authorUserId>240559</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>for the first 5 levels you could have somthing like this</p> <div class="code"> <pre><code>ClrHome 1→A Repeat K=105 getKey→K Output(4,8,A Output(3,8,&quot;▫ Output(5,8,&quot; If K=25 and A&lt;5 A+1→A If K=34 and A&gt;1 A-1→A End randInt(1,10A)→B randInt(1,10A)→C randInt(1,10A)→D Disp &quot;Numbers&quot;,B,C,&quot;Answers&quot;,D Input &quot;Equation: &quot;,E If E=D Disp &quot;You Win!&quot; If E≠D Disp &quot;You Lose&quot;</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-108984#post-321525</guid>
				<title>Re: Optimize me #5</title>
				<link>http://tibasicdev.wikidot.com/forum/t-108984/optimize-me-5#post-321525</link>
				<description></description>
				<pubDate>Sat, 29 Nov 2008 01:23:23 +0000</pubDate>
				<wikidot:authorName>basickevin</wikidot:authorName>				<wikidot:authorUserId>114819</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Are we trying to optimize for speed or size as a priority?<br /> edit: Also, what are all of the extra numbers for? I have no idea what is going on when I play this game. Almost all of the variables have nothing to do with the answer.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-108984#post-321448</guid>
				<title>Re: Optimize me #5</title>
				<link>http://tibasicdev.wikidot.com/forum/t-108984/optimize-me-5#post-321448</link>
				<description></description>
				<pubDate>Fri, 28 Nov 2008 22:31:33 +0000</pubDate>
				<wikidot:authorName>Timothy Foster</wikidot:authorName>				<wikidot:authorUserId>197988</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 My optimization<br /> I will finish later<br /> <a href="http://tarm.wikidot.com"><img src="http://tarm.wdfiles.com/local--files/start/tarmsig.png" alt="tarmsig.png" class="image" /></a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-108984#post-321276</guid>
				<title>Re: Optimize me #5</title>
				<link>http://tibasicdev.wikidot.com/forum/t-108984/optimize-me-5#post-321276</link>
				<description></description>
				<pubDate>Fri, 28 Nov 2008 19:31:46 +0000</pubDate>
				<wikidot:authorName>Timothy Foster</wikidot:authorName>				<wikidot:authorUserId>197988</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Oops, those numbers on the Menu's were supposed to change.<br /> Also, all of the int(10rand)'s can be randInt(1,10<br /> The If's could be If&#8230;Then&#8230;Else&#8230;End<br /> All the stores shouldn't exist.<br /> In fact, the menu's can be omitted into a &quot;Goto 0&quot; and the player can select the same again if he/she wishes.</p> <hr /> <a href="http://tarm.wikidot.com"><img src="http://tarm.wdfiles.com/local--files/start/tarmsig.png" alt="tarmsig.png" class="image" /></a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-108984#post-321267</guid>
				<title>Re: Optimize me #5</title>
				<link>http://tibasicdev.wikidot.com/forum/t-108984/optimize-me-5#post-321267</link>
				<description></description>
				<pubDate>Fri, 28 Nov 2008 19:26:26 +0000</pubDate>
				<wikidot:authorName>rhombus p</wikidot:authorName>				<wikidot:authorUserId>240559</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>you have the same menu in there over and over again. you only need to put it in once and use a label to goto it</p> <p>EDIT: oh never mind there different.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-108984#post-321262</guid>
				<title>Re: Optimize me #5</title>
				<link>http://tibasicdev.wikidot.com/forum/t-108984/optimize-me-5#post-321262</link>
				<description></description>
				<pubDate>Fri, 28 Nov 2008 19:20:16 +0000</pubDate>
				<wikidot:authorName>jnesselr</wikidot:authorName>				<wikidot:authorUserId>142001</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>ahh&#8230; My eyes&#8230; My eyes&#8230; It's too&#8230; too&#8230; ahh, there isn't even a word to describe it!!!</p> <p>Seriously now, I didn't look at it much, but it could use some optimization.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-108984#post-321248</guid>
				<title>Optimize me #5</title>
				<link>http://tibasicdev.wikidot.com/forum/t-108984/optimize-me-5#post-321248</link>
				<description></description>
				<pubDate>Fri, 28 Nov 2008 19:03:23 +0000</pubDate>
				<wikidot:authorName>Timothy Foster</wikidot:authorName>				<wikidot:authorUserId>197988</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Here is the first game I've ever made in programming. Let's see how much optimization can be made&#8230;</p> <div class="code"> <pre><code>:ClrHome :Lbl 0 :Menu(&quot;Equation Game!&quot;,&quot;Level 1&quot;,1,&quot;Level 2&quot;,2,&quot;Level 3&quot;,3,&quot;Level 4&quot;,4,&quot;Level 5&quot;,5,&quot;Extreme&quot;,6,&quot;Ultimate&quot;,7) :Lbl 1 :int(10rand)→A :int(10rand)→B :int(10rand)→C :Disp &quot;Numbers&quot; :Disp A :Disp B :Disp &quot;Answer&quot; :Disp C :Disp &quot;Equation?&quot; :Prompt E :If E=C :Disp &quot;You Win!&quot; :If E≠C :Disp &quot;You Lose&quot; :Pause :Menu(&quot;Select&quot;,&quot;Again&quot;,1,&quot;Menu&quot;,0,&quot;Quit&quot;,Q) :Lbl 2 :int(20rand)→A :int(20rand)→B :int(20rand)→C :Disp &quot;Numbers&quot; :Disp A :Disp B :Disp &quot;Answer&quot; :Disp C :Disp &quot;Equation?&quot; :Prompt E :If E=C :Disp &quot;You Win!&quot; :If E≠C :Disp &quot;You Lose&quot; :Pause :Menu(&quot;Select&quot;,&quot;Again&quot;,2,&quot;Menu&quot;,0,&quot;Quit&quot;,Q) :Lbl 3 :int(10rand)→A :int(10rand)→B :int(10rand)→C :int(20rand)→D :Disp &quot;Numbers&quot; :Disp A :Disp B :Disp C :Disp &quot;Answer&quot; :Disp D :Disp &quot;Equation?&quot; :Prompt E :If E=D :Disp &quot;You Win!&quot; :If E≠D :Disp &quot;You Lose&quot; :Pause :Menu(&quot;Select&quot;,&quot;Again&quot;,3,&quot;Menu&quot;,0,&quot;Quit&quot;,Q) :Lbl 4 :10+int(‾20rand)→A :10+int(‾20rand)→B :10+int(‾20rand)→C :Disp &quot;Numbers&quot; :Disp A :Disp B :Disp &quot;Answer&quot; :Disp C :Disp &quot;Equation?&quot; :Prompt E :If E=C :Disp &quot;You Win!&quot; :If E≠C :Disp &quot;You Lose&quot; :Pause :Menu(&quot;Select&quot;,&quot;Again&quot;,4,&quot;Menu&quot;,0,&quot;Quit&quot;,Q) :Lbl 5 :int(20rand)→A :int(20rand)→B :int(500rand)→C :Disp &quot;Numbers&quot; :Disp A :Disp B :Disp &quot;Answer&quot; :Disp C :Disp &quot;Equation?&quot; :Prompt E :If E=C :Disp &quot;You Win!&quot; :If E≠C :Disp &quot;You Lose&quot; :Pause :Menu(&quot;Select&quot;,&quot;Again&quot;,5,&quot;Menu&quot;,0,&quot;Quit&quot;,Q) :Lbl 6 :int(2rand)→A :int(10rand)→B :int(10rand)→C :int(10rand)→D :If A=1 :Disp &quot;Use Only +-*/^&quot; :If A=0 :Disp &quot;Use Only +-()√(&quot; :Disp &quot;Numbers&quot; :Disp A :Disp B :Disp &quot;Answer&quot; :Disp C :Disp &quot;Equation?&quot; :Prompt E :If E=C :Disp &quot;You Win!&quot; :If E≠C :Disp &quot;You Lose&quot; :Pause :Menu(&quot;Select&quot;,&quot;Again&quot;,6,&quot;Menu&quot;,0,&quot;Quit&quot;,Q) :Lbl 7 :int(10rand)→A :int(10rand)→B :int(10rand)→C :int(10rand)→D :int(10rand)→F :int(10rand)→G :Disp &quot;Numbers&quot; :Disp A+Bi :Disp C+Di :Disp 2 :Disp &quot;Answer&quot; :Disp F+Gi :Disp &quot;Equation?&quot; :Prompt E :If real(E)=F and imag(E)=G :Disp &quot;You Win!&quot; :If real(E)≠F and imag(E)≠G :Disp &quot;You Lose&quot; :Pause :Menu(&quot;Select&quot;,&quot;Again&quot;,7,&quot;Menu&quot;,0,&quot;Quit&quot;,Q) :Lbl Q :Clrhome</code></pre></div> <br /> Ugly or what? <hr /> <a href="http://tarm.wikidot.com"><img src="http://tarm.wdfiles.com/local--files/start/tarmsig.png" alt="tarmsig.png" class="image" /></a>
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>