This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages  JWinslow23
586
« on: November 11, 2013, 01:00:23 pm »
I like labels in BASIC because they can often be an excellent solution and often the best solution I agree with Xeda. I used labels because I thought it was the best solution. Anyways, to answer harold, there are no unsolvable starting conditions. (Think of it like a scrambled Rubiks cube, or a scrambled knot in a string whose ends are tied together). When I made one, I wasn't sure if there were unsolvable solutions, so I just simulated n steps and presented the board. That must have been slow, Xeda. Harold, I did my research first, and at least for 6 by 6 grids, there are no unsolvable starting conditions. So, int(2rand(36 was sufficient. So, was the game good?
587
« on: November 11, 2013, 12:55:31 pm »
I build my basic progs usually somehow like this: (blah blah blah code)
Now I see how it works! We just need to optimally substitute it into the program somehow. You can see how the program works, right?
588
« on: November 11, 2013, 12:46:30 pm »
You can like put a long while loop around it with
While K=45
[...]
End Seeing that you have K=45 as a condition to start again. Just an idea, though
I don't see how that would work. I know that labels are discouraged in BASIC, but sometimes they are the optimal solution. This may be one of those times.
589
« on: November 11, 2013, 12:35:52 pm »
This is a lessthanakilobyte clone of Lights Out. CONTROLS First, you will go to the main menu. Press up and down to go between menu options, and Enter to select. Press left and right to switch between modes. Ingame, press the arrow keys to move along the Lights Out grid, and Enter to turn that and all adjacent lights off. You keep going until the lights are all turned off, or you can press CLEAR at any time to quit. Either way, you will be sent back to the main menu. MODES The first mode is Normal mode, where all the lights are turned on. The second mode is Random mode, where it selects a random configuration of lights. The third mode is custom. It brings you to a screen with the grid you can customize. The controls are the same as ingame, except no special rules for switching lights apply. CLEAR goes to the game with the pattern. CODELbl S ClrHome " Ans+Ans+Ans+Ans Disp " SHUTDOWN",Ans," PLAY",Ans," MODE:",Ans," EXIT 3→X 1→Y Repeat K=105 Output(5,8,sub("NORMALRANDOMCUSTOM",6Y5,6 Output(X,1,"> getKey→K If Ans Then Output(X,1," X+2(Ans=34 and X≠7)2(Ans=25 and X≠3→X Y+(K=26)(K=24 Ans3(Ans=4)+3not(Ans→Y End End 36→dim(L₁ If X=7 Goto E If Y=3 Then ClrHome DelVar A1→B Disp " For X,1,6 Disp " OOOOOO End Fill(0,L₁ Repeat K=45 and sum(L₁ Output(A+2,B+1," rand(8 Output(A+2,B+1,sub("O*",1+L₁(6A+B),1 getKey→K A+(Ans=34 and A≠5)(Ans=25 and A→A B+(K=26 and B≠6)(K=24 and B≠1→B 6A+Ans If K=105 not(L₁(Ans→L₁(Ans End End If Y=2 Then Repeat sum(Ans int(2rand(36→L₁ End End If Y=1 Fill(1,L₁ ClrHome " Output(1,10,"! SHUT "+Ans+"! DOWN "+Ans+"+"+Ans+"!MODE: "+Ans+"! "+Ans+"+"+Ans+"LIGHT:"+Ans+"! Output(5,11,sub("NORMALRANDOMCUSTOM",6Y5,6 For(X,0,5 For(Y,1,6 Output(2+X,1+Y,sub("O*",1+L₁(6X+Y),1 End End DelVar X1→Y Repeat K=45 or not(sum(L₁ Output(8,12," Output(8,11,sum(L₁ Output(X+2,Y+1," rand(8 Output(X+2,Y+1,sub"O*",1+L₁(6X+Y),1 getKey→K X(Ans=25 and X)+(Ans=34 and X≠5→X Y(K=24 and Y≠1)+(K=26 and Y≠6→Y If K=105 Then For(A,1,5 6X+Y {(Ans6)not(not(X)),(Ans1)(Y≠1),Ans,(Ans+1)(Y≠6),(Ans+6)(X≠5 Ans(A If Ans not(L₁(Ans→L₁(Ans End For(A,Xnot(not(X)),X+(X≠5 For(B,Y(Y≠1),Y+(Y≠6 Output(A+2,B+1,sub("O*",1+L₁(6A+B),1 End End End End If K=45 Goto S Output(8,11,0 Pause "YOU WIN! Goto S Lbl E DelVar L₁DelVar ADelVar BDelVar KDelVar XDelVar YClrHome
590
« on: November 09, 2013, 08:30:04 pm »
OK, I'm glad it's getting a somewhat good review. Hopefully it can support Golden Cookies soon!
Oh, and I missed the Alchemy Lab building. I'll modify the code soon enough.
591
« on: November 07, 2013, 07:51:14 pm »
You need to save bytes on structure of the program. Check if there are smarter ways to get to the same result. That is what's optimization is all about.
That's part of the reason I posted it here. I can't think of any improvements.
592
« on: November 07, 2013, 07:05:25 pm »
Also, the basic tip of TIBASIC optimization is that you don't need those end quotation marks.
I know, but this is not included in the actual game. This is only so you can see where they end. This actually only takes up 973 bytes, minus the name.
593
« on: November 06, 2013, 05:47:30 pm »
This is my code for a Cookie Clicker game with support for a TI83+ OS 1.19 (and possibly other platforms).
DelVar L₁ClrHome SetUpEditor CLICK 10→dim(∟CLICK ∟CLICK→L₁ 9→dim(L₁ Output(3,5,"= OO !CURSOR OO*O!PRICE: O*OO! O*OO!OWNED: OO ! ∟CLICK(10→C "CURSOR GRANDMA FARM FACTORY MINE SHIPMENT PORTAL TIMEMACHINEANTIMATTER →Str1 DelVar S1→B {15,E2,500,3E3,E4,4E4,1666666,123456789,4E91→L₂ For(X,1,9 int(L₂(X)1.15^L₁(X→L₄(X End {.1,.5,4,10,40,E2,6666,98765,E61→L₃ Output(6,6,L₄(1 Output(8,6,L₁(1 Repeat K=45 getKey→K If K=105 Then Output(1,1," " C+1→C Output(1,1,int(C End B+(K=26)(K=24 Ans9(Ans=10)+9not(Ans→B Output(4,6,sub(Str1,11B10,11 If sum(K={24,26 Then Output(6,6," " Output(6,6,L₄(B Output(8,6," " Output(8,6,L₁(B End L₁(B)(K=85 and L₁(B))+(K=95 and C≥L₄(B→L₁(B If K=95 and C≥L₄(B Then int(L₂(B)1.15^L₁(B→L₄(B Output(6,6," " Output(6,6,L₄(B Output(8,6," " Output(8,6,L₁(B Output(1,1," " Output(1,1,int(C End If K=85 Then int(L₂(B)1.15^L₁(B→L₄(B Output(6,6," " Output(6,6,L₄(B Output(8,6," " Output(8,6,L₁(B End If not(S Then C+sum(L₁L₃→C Output(1,1,int(Ans End Output(2,1," " Output(2,1,int(sum(L₁L₃ S+14(S=3→S End C→L₁(10 L₁→∟CLICK ClrHome What do you think?
594
« on: February 11, 2013, 06:41:50 pm »
4462: You understand z80 assembly. 4463: If not, you are attempting to understand assembly. 4464: Instead of using someone else's program, you insist on making your own. 4465: You think that this list should be over by now.
