Jump to content



Photo
- - - - -

[fx-5800P/G] Guess Number - Updates & Bug Reports thread

Game Guess Number fx-5800P fx-7400GII fx-9750GII fx-9860G series

  • Please log in to reply
40 replies to this topic

#41 CalcLoverHK

CalcLoverHK

    Casio Freak

  • Members
  • PipPipPipPip
  • 107 posts
  • Gender:Male
  • Location:Hong Kong
  • Interests:Playing video games (especially Minecraft), calculators, programming (Casio Basic/Basic-like,Scratch), watching memes, IT research, mathematics...

  • Calculators:
    fx-50FHII
    fx-9860GII Emulator (trial)
    fx-CG50 Emulator (trial)

Posted 19 August 2019 - 08:21 AM

Dear community,

 

The quick bugfix annd official CG series-compatible version of Guess Number for graphical calculators has been released. It is version 1.0.1.

 

Changelogs

-Compatible with CG10/20/50 calculators

-Fixed a bug that during configuration it doesn't show the value

-Fixed a bug regarding Getkey problem (Thanks sentaro21 of his bug report!)

 

***Note*** (Do not type parenthenes)

/E/ means exponential symbol ( E ).

/10^/ should occupy only one byte. ( 10^ )

 

-Core program (Filename: G.Number)
Lbl 0
3→P
Do
ClrText
Locate 5,1,"Guess Number"
Locate 1,7,"Version 1.0.1"
Locate 7,3,"New game"
Locate 7,4,"Continue"
Locate 7,5,"Settings"
Locate 7,6,"Quit"
Locate 6,P,"▶"
Getkey→C
Do
Getkey→K
LpWhile C≠K
K=37 And P<7⇒Isz P
K=28 And P>3⇒Dsz P
If K=31
Then While P=3 Or P=4
If J≠0 And P=4
Then ClrText
"Warning! Current"
"progress will be"
"destroyed!"
"Are you sure you want"
"to start new game?"
"[1]:yes"
"[0]:no"
Do
Getkey→K
LpWhile K≠71 And K≠72
IfEnd
K=71⇒Break
While J=0
L→M
ClrList 1
W→Dim List 1
ClrText
Menu "Select:","Back to menu",0,"Bulls and Cows",1,"Range",2
Lbl 1
Do
0→M
RanInt#(0,9,W)→List 1
For 1→A To W-1
For 1→B To W
A<B⇒List 1[A]=List 1[B]⇒1→C
Next
Next
LpWhile U And C
1→J
ClrList 4
ClrList 5
ClrList 6
999→A
A→Dim List 4
A→Dim List 5
A→Dim List 6
Break
Lbl 2
RanInt#(Q+1,R-1)→List 1
Q→X
R→Y
2→J
WhileEnd
Do
M≦0⇒Break
ClrList 2
W→Dim List 2
44→K
Do
Lbl 3
ClrText
If K=44
Then 0→Z
Fill(-1,List 2)
9876543210→S
IfEnd
"Moves:"
Locate 7,1,M
"Input:"
Locate 7,2,Z
"Result: "
If J=1
Then " A B"
Locate 1,4,X
Locate 3,4,Y
Else "Minimum:"
"Maximum:"
Locate 9,4,X
Locate 9,5,Y
IfEnd
Getkey→C
Do
Getkey→K
LpWhile C≠K
K>70 And K<75⇒(K≠71)(1+3(K-72))→I
K>61 And K<65⇒2+3(K-62)→I
K>51 And K<55⇒3(K-51)→I
While K=48
Lbl 6
ClrText
Menu "PAUSED","Resume",3,"Save & Quit",0,"Give up",4,"Records",C
Lbl 4
1→K
Menu "Give up?","yes",7,"no",6
Lbl C
If V=1
Then 1→T
Do
ClrText
"◀Back"
Locate 9,1,"↑ or ↓"
Locate 1,2,"M   Value"
J=1⇒Locate 19,2,"A B"
For 1→A To 5
A+2→B
A+5T-5→C
If C≠/E/3
Then Locate 1,B,C
Locate 5,B,List 4[C]
J=1⇒Locate 18,B,List 5[C]
J=1⇒Locate 20,B,List 6[C]
IfEnd
Next
Getkey→C
Do
Getkey→K
LpWhile C≠K
T<200 And K=37⇒Isz T
T>1 And K=28⇒Dsz T
LpWhile K≠38
Else ClrText
"You have disabled"
"records!"
Locate 1,6,"[EXE]:back"◢
IfEnd
48→K
WhileEnd
If (Frac(S÷/10^/(I+1))≧I÷10 And I≧1) Or (I=0 And Not(Frac(S÷/10^/(I+1))))
Then I→List 2
U And Not(I)⇒Isz S
U⇒S-I/10^/(I)→S
10Z+I→Z
IfEnd
-1→I
0→B
LpWhile K≠31 Or (J=1 And Min(List 2)<0) Or (J=2 And (Z≦X Or Z≧Y))
M-1→M
If J=1
Then For 1→A To W
For 1→B To W
If List 1[A]=List 2[B]
Then A=B⇒Isz X
A≠B⇒Isz Y
IfEnd
Next
Next
X=W⇒Break
Else Z<K⇒Z→X
Z>K⇒Z→Y
IfEnd
Z→List 4
If J=1
Then X→List 5
Y→List 6
IfEnd
LpWhile Z≠List 1[1]
Lbl 7
ClrText
If M≧0 And K
Then M=0⇒"No moves"
K=1⇒"Give up"
Else L-M→B
0→A
Do
Isz A
LpWhile B÷/10^/(A)<1⇒Break
Locate 1,1,B
Locate 2+A,1,"out of"
Locate 9+A,1,L
IfEnd
Locate 1,2,"Ans:"
If J=1
Then For 1→A To W
Locate 4+A,2,List 1[A]
Next
Else Locate 5,2,List 1[1]
IfEnd
Locate 1,6,"[EXE]:back"◢
WhileEnd
While P=5
ClrText
1→P
Do
ClrText
Locate 1,2P+1-6(P>3 And P<7),"▶"
"◀Menu"
If P>0 And P<4
Then Locate 9,1,"↓"
Locate 1,2,"Move limit:"
Locate 2,3,L
Locate 1,4,"Min. range:"
Locate 2,5,Q
Locate 1,6,"Max. range:"
Locate 2,7,R
IfEnd
If P>3 And P<7
Then Locate 7,1,"↑"
Locate 1,2,"Disable repeat num.?"
U=1⇒Locate 2,3,"True"
U=0⇒Locate 2,3,"False"
Locate 1,4,"Enable records?"
V=1⇒Locate 2,5,"True"
V=0⇒Locate 2,5,"False"
Locate 1,6,"Amount of integers:"
Locate 2,7,W
IfEnd
Getkey→C
Do
Getkey→K
LpWhile C≠K
K=37 And P<6⇒Isz P
K=28 And P>1⇒Dsz P
If K=31
Then P=4⇒Not(U)→U
P=5⇒Not(V)→V
IfEnd
If K=44 And P<4
Then 0→A
Locate 2,2P+1,"                    "
Locate 2,2P+1,A
Do
-1→I
Getkey→C
Do
Getkey→K
LpWhile C≠K
K>70 And K<75⇒(K≠71)(1+3(K-72))→I
K>61 And K<65⇒2+3(K-62)→I
K>51 And K<55⇒3(K-51)→I
I≧0⇒10A+I→A
LpWhile K=31
P=1⇒A→L
P=2⇒A→Q
P=3⇒A→R
IfEnd
If P=6
Then K=42⇒Isz V⇒V=11⇒10→V
K=32⇒Dsz V⇒V=3⇒4→V
IfEnd
LpWhile K≠38
WhileEnd
IfEnd
LpWhile P=6 And K=31
Menu "Quit?","yes",5,"no",0
Lbl 5
ClrText
"Please wait a moment"
"DO NOT PRESS [AC]"
If Dim List 3≠11+W
Then ClrList 3
11+W→Dim List 3
IfEnd
{J,L,Q,R,M,U,V,X,Y,Z,W}→List 3
For 1→A To W
List 1[A]→List 3
Next
ClrText
"Saved in backup."
"You may now quit."
"[AC]:quit"◢
-GNBRIT subprogram (Filename: GNBRIT) [Optional]
4→P
Lbl 0
Do
ClrText
Locate 1,P,"▶"
Locate 5,1,"Guess Number"
Locate 2,2,"GNBRIT subprogram"
Locate 2,4,"Check"
Locate 2,5,"Information"
Locate 2,6,"Reset all"
Locate 2,7,"Quit"
Getkey→C
Do
Getkey→K
LpWhile C≠K
K=37 And P<7⇒Isz P
K=28 And P>4⇒Dsz P
If K=31
Then If P=4
Then If Dim List 3≠11+List 3[11]
Then ClrList 3
15→Dim List 3
4→List 3[11]
IfEnd
For 1→A To List 3[11]
List 1[A]≠List 3[A+11]⇒1→B
Next
If J≠List 3[1] Or L≠List 3[2] Or Q≠List 3[3] Or R≠List 3[4] Or M≠List 3[5] Or U≠List 3[6] Or V≠List 3[7] Or X≠List 3[8] Or Y≠List 3[9] Or Z≠List 3[10] Or W≠List 3[11] Or B
Then "Seems that your data is different from"
"its backup data. Do"
"you wish to use the"
"backup data instead?"
"[1]:yes"
"[0]:no"
Do
Getkey→K
LpWhile K≠71 And K≠72
IfEnd
If K=71
Then ClrMemory
List 3[1]→J
List 3[2]→L
List 3[3]→Q
List 3[4]→R
List 3[5]→M
List 3[6]→U
List 3[7]→V
List 3[8]→X
List 3[9]→Y
List 3[10]→Z
List 3[11]→W
For 1→A To W
List 3[11+A]→List 1[A]
Next
IfEnd
IfEnd
If P=5
Then ClrText
"[Game version]"
"1.0.1 for fx-7400GII-"
"9750GII-9860-CG10-"
"CG20-CG50"
"[Tool version]"
"20190819"◢
ClrText
"[Author]"
"CalcLoverHK"
"[Special thanks]"
"sentaro21"
Locate 1,6,"[EXE]:back"◢
IfEnd
If P=6
Then Menu "Are you sure?","yes",1,"no",0
Lbl 1
ClrMemory
ClrList
10→L
1→Q
/E/2→R
1→U
3→P
1→V
4→W
IfEnd
IfEnd
LpWhile P≠7 And K≠31
Menu "Quit?","yes",2,"no",0
Lbl 2
ClrText

 

Please note that this version is CG series-compatible only and fx-7400GII/9750GII/9860G series are still the main supported calculators. Exclusive version for CG series will be split from this version. It is planned to be added colour support and colour guess gameplay. (the concept of the original-cancelled MasterMind gamemode)

 

Hope you enjoy.

 

Best regards,

CalcLoverHK







Also tagged with one or more of these keywords: Game, Guess Number, fx-5800P, fx-7400GII, fx-9750GII, fx-9860G series

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users