Guess Number source code for fx-5800P Ver.1.0-beta3 By CalcLoverHK Cautions: *Before playing, please select ">Settings<", then select "ResetAll" to reset all variables to work with the program. *This program is in beta stage and contains bugs that are yet to be fixed. Please back up your files to test it. *If you find any bug, please report them on Guess Number updates & annoucements forum. Thanks! Keys: {} = Recommended file name [] = Necessary file name => = ⇒ -> = → -Main menu {Guess Number} 1->P:Locate 3,1,"Guess Number":Locate 1,3,"By CalcLoverHK":Locate 1,4,"Ver.1.0-beta2":Do:Cls:P=1=>Locate 4,2,">New game<":P=2=>Locate 4,2,">Continue<":P=3=>Locate 4,2,">Settings<:Getkey->K:K=84 And P>1=>Dsz P:K=85 And P<3=>Isz P:If (P=1 Or P=2) And K=47:Then If J=0:Then Cls:"K:LpWhile K≠35 And K≠36 And K≠83:IfEnd:K=35 Or J=1=>Prog "gn.gameplay1":K=36 Or J=2=>Prog "gn.gameplay2":IfEnd:P=3 And K=47=>Prog "gn.settings":LpWhile 1 -Settings menu [gn.settings] Do:Cls:"K:If K=35 Or K=36:Then Cls:"Are you sure?":Locate 1,3,"[1] Yes":Locate 1,4,"[0] No":Do:Getkey->T:T=35=>1->W:T=25=>0->W:LpWhile T≠25 And T≠35:IfEnd:If K=35 And W=1:Then Do:Cls:"(1-99)":"Move limit"?L:Int(L->L:LpWhile L<1 Or L>99:Do:Cls:"(>0)":"Min. range"?Q:Int(Q->Q:Cls:"(>Q by 2)":"Max. range"?R:Int(R->R:LpWhile Q<1 Or R<1 Or R-Q<2:Prog "gn.done":IfEnd:If K=36 And W=1:Then ClrMemory:8->L:1->Q:E2->R:Prog "gn.done":IfEnd:LpWhile K≠83:Return -Bulls and Cows [gn.gameplay1] If J=0:Then Prog "gn.clear":Do:RanInt#(0,9->A:RanInt#(0,9->B:RanInt#(0,9->C:RanInt#(0,9->D:LpWhile A=B Or A=C Or A=D Or B=C Or B=D Or C=D:L->M:1->J:IfEnd:Do:M=0=>Break:Do:Cls:"Moves:":Locate 7,1,M:Locate 1,2,"Input:":Locate 1,3,"A:":Locate 3,3,X:Locate 1,4,"B:":Locate 3,4,Y:E≧0=>Locate 7,2,E:F≧0=>Locate 8,2,F:G≧0=>Locate 9,2,F:H≧0=>Locate 10,2,H:Getkey->K:K=25=>0->I:K>34 And K<38=>K-34->I:K>20 And K<24=>K-17->I:K>30 And K<34=>K-24->I:K=34=>Prog "gn.clear":If (Frac(S÷10^(I+1))≧I÷10 And I) Or (I=0 And Frac(S÷10^(I+1))=0):Then Prog "gn.check":I=0 And O=1=>Isz S:I>0 And O=1=>S-I10^(I->S:IfEnd:LpWhile K≠47 And A≧0 And B≧0 And C≧0 And D≧0:(A=E)+(B=F)+(C=G)+(D=H->X:(A=F)+(A=G)+(A=H)+(B=E)+(B=G)+(B=H)+(C=E)+(C=F)+(C=H)+(D=E)+(D=F)+(D=G->Y:LpWhile X≠4M-:Do:Locate 1,1,"Moves:":If M≠0:Then Locate 7,1,L-M+1:Locate 1,2,"Out of":Locate 8,2,L:Else Locate 1,1,"Out of moves":IfEnd:Locate 1,3,"Ans:":Locate 5,3,E3A+E2B+10C+D:Locate 1,4,"N:Q->X:R->Y:L->M:2->J:IfEnd:Do:M=0=>Break:Cls:"Moves:":Locate 7,1,M:Locate 1,2,"Input:":Locate 1,3,"A:":Locate 3,3,X:Locate 1,4,"B:":Locate 3,4,Y◢Do:Cls:"Input="?->I:Int(I->I:LpWhile I≦X Or I≧Y:II->X:I>K=>I->B:LpWhile I≠NM-:Do:Locate 1,1,"Moves:":If M≠0:Then Locate 7,1,L-M+1:Locate 1,2,"Out of":Locate 8,2,L:Else "Out of moves":IfEnd:Locate 1,3,"Ans:":Locate 5,3,N:Locate 1,4,"E:1->O:Return:IfEnd:If F<0:Then I->F:1->O:Return:IfEnd:If G<0:Then I->G:1->O:Return:IfEnd:If H<0:Then I->H:1->O:IfEnd:Return -Clear [gn.clear] -1->E:-1->F:-1->G:-1->H:9876543210->S:Return -Done menu [gn.done] Cls:"Done":Locate 1,4,"