0 Members and 2 Guests are viewing this topic.
Lbl SClrHome"----Ans+Ans+Ans+AnsDisp " SHUTDOWN",Ans," PLAY",Ans," MODE:",Ans," EXIT3→X1→YRepeat K=105Output(5,8,sub("NORMALRANDOMCUSTOM",6Y-5,6Output(X,1,">getKey→KIf AnsThenOutput(X,1," X+2(Ans=34 and X≠7)-2(Ans=25 and X≠3→XY+(K=26)-(K=24Ans-3(Ans=4)+3not(Ans→YEndEnd36→dim(L₁If X=7Goto EIf Y=3ThenClrHomeDelVar A1→BDisp "For X,1,6Disp " OOOOOOEndFill(0,L₁Repeat K=45 and sum(L₁Output(A+2,B+1," rand(8Output(A+2,B+1,sub("O*",1+L₁(6A+B),1getKey→KA+(Ans=34 and A≠5)-(Ans=25 and A→AB+(K=26 and B≠6)-(K=24 and B≠1→B6A+AnsIf K=105not(L₁(Ans→L₁(AnsEndEndIf Y=2ThenRepeat sum(Ansint(2rand(36→L₁EndEndIf Y=1Fill(1,L₁ClrHome" Output(1,10,"! SHUT "+Ans+"! DOWN "+Ans+"+------"+Ans+"!MODE: "+Ans+"! "+Ans+"+------"+Ans+"LIGHT:"+Ans+"!Output(5,11,sub("NORMALRANDOMCUSTOM",6Y-5,6For(X,0,5For(Y,1,6Output(2+X,1+Y,sub("O*",1+L₁(6X+Y),1EndEndDelVar X1→YRepeat K=45 or not(sum(L₁Output(8,12," Output(8,11,sum(L₁Output(X+2,Y+1," rand(8Output(X+2,Y+1,sub"O*",1+L₁(6X+Y),1getKey→KX-(Ans=25 and X)+(Ans=34 and X≠5→XY-(K=24 and Y≠1)+(K=26 and Y≠6→YIf K=105ThenFor(A,1,56X+Y{(Ans-6)not(not(X)),(Ans-1)(Y≠1),Ans,(Ans+1)(Y≠6),(Ans+6)(X≠5Ans(AIf Ansnot(L₁(Ans→L₁(AnsEndFor(A,X-not(not(X)),X+(X≠5For(B,Y-(Y≠1),Y+(Y≠6Output(A+2,B+1,sub("O*",1+L₁(6A+B),1EndEndEndEndIf K=45Goto SOutput(8,11,0Pause "YOU WIN!Goto SLbl EDelVar L₁DelVar ADelVar BDelVar KDelVar XDelVar YClrHome
While K=45[...]End
You can like put a long while loop around it withCode: [Select]While K=45[...]EndSeeing that you have K=45 as a condition to start again.Just an idea, though
Repeat A=3 and C=21 //A=3 is then the bottom-most menu item, exit<draw menu>Repeat C=21<menu routineEndIf A=0Then<stuff for first menu point>0->A //put cursor at the top again and prevent exitingEndIf A=1Then<stuff for second menu point>0->A //put cursor at the top again and prevent exitingEndIf A=2Then<stuff for third menu point>0->A //put cursor at the top again and prevent exitingEndEnd
I build my basic progs usually somehow like this:(blah blah blah code)
Quote from: Sorunome on November 11, 2013, 12:51:56 pmI 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?
I like labels in BASIC because they can often be an excellent solution and often the best solution [...]
I like labels in BASIC because they can often be an excellent solution and often 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.
When's that They also have that memory bug
Hmm, try to avoid double posting please. You have an edit and a delete button at the top of your post.
Quote from: Xeda112358 on November 11, 2013, 12:56:18 pmI like labels in BASIC because they can often be an excellent solution and often the best solution [...]When's that They also have that memory bug
Lbl 0Menu("HEADER","ITEM 1",01,"ITEM 2",10,"EXIT",1Lbl 01Pause "HI!Goto 0Lbl 10Pause "HAHAHAHAHAGoto 0Lbl 1