_________________________________________________________________________
Title: Master Mind 1.2f
Author: Magnus Werner
Written by: Magnus Werner
Description: Master Mind. Find the combination.
Remarks: You may alter difficultylevel by choosing how many
different numbers the Casio should randomize.
_________________________________________________________________________
Command translation:
-> Single arrow (located on the keyboard)
=> Double arrow (press: [shift] [prgm] [f1] [f1])
_ Display, -Disp- (press: [shift] [prgm] [f4])
<= Less or equal (A <= B)
>= Greater or equal (A >= B)
<> Not equal (A <> B)
^ Raised to the power of
/ Division or fraction (explain which with a comment)
2rt() Root (2rt(7) is the square root of 7)
4rt() 4th root
pi pi (~3.14159265359, low case)
e() e(1) (~2.7818281846, low case)
E Exponent (5E4 gives 5*10^4) (located on the keyboard,
[EXP])
_________________________________________________________________________
Program:
'MASTER MIND'
Lbl 1
"MASTER MIND 1.2F
LEVEL (4-9)"? -> L
L<4 => 4 -> L
L>9 => 9 -> L
"IN USE:"
L_
0 -> S
Lbl 2
"NEW GAME..."
f1 -> A ; code for functionmemory 1 below
f1 -> B
f1 -> C
f1 -> D
1 -> D
11 -> T
Lbl 0
T-1 -> T
"TURNS LEFT:"
T_
"PLACE 1"? -> G
"PLACE 2"? -> H
"PLACE 3"? -> I
"PLACE 4"? -> J
0 -> U
0 -> V
0 -> W
0 -> X
G=B => 8 -> U:G=C => 8 -> U:
G=D => 8 -> U:H=A => 8 -> V:
H=C => 8 -> V:H=D => 8 -> V:
I=A => 8 -> W:I=B => 8 -> W:
I=D => 8 -> W:J=A => 8 -> X:
J=B => 8 -> X:J=C => 8 -> X:
A=G => 1 -> U:B=H => 1 -> V:
C=I => 1 -> W:D=J => 1 -> X
"CORRECT:
[1=CORRECT ]
[0=NOT CORRECT]
[8=WRONG PLACE]"
U_
V_
W_
X_
(U+V+W+X)=4 => Goto 9
T=0 => Goto 8
Goto 0
Lbl 9
T*L -> Q
Q+S -> S
"YOU WIN!!!
TOTAL SCORE:"
S_
Goto 2
Lbl 8
"ALL 10 TURNS
USED, CORRECT:"
A_
B_
C_
D_
S-20 -> S
"TOTAL SCORE:"
S_
Goto 2
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Functionmemory 1:
Int (LRan#)+1
_________________________________________________________________________