Application
#2
Memory Master
Game
This challenging game will test your ability
to
memorize a random sequence
of
musical tones.
Insert the cassette containing the Memory
Master
application program in your
cassette recorder. Rewind the cassette if necessary. If you have loaded the Calculator
application program and have not changed the position
of
the tape, you can speed up
loading the Memory Master program
by
not rewinding the cassette.
Clear memory with the NEW command and then load the Memory Master program by
pressing PLAY
on
the recorder and entering the command
CLOAD
"MEMO"
List the program and compare it
to
the listing below to verify that it loaded correctly.
100
CLS
:
P=RND(-VAL(RIGHTS(TIMESt2»)
110
PRINT
"Want
Instructions
(Y=yest
N=no)"i:
GOSUB
1000
120
IF
A$="Y"
OR
A$="
y
"
THEN
GOSUB21l11l11l11l1
125
IF
AS()"N"
AND
AS()"n"
GOTO
100
13111
PRINT
"Len~t~
of
sequence
L
(1lI-9)";
GOSUB
1000
: L = VAL(AS)
132
IF
L=0
GOTO
800
134
PRINT "How many
notes
N
(2-9)"i
:
GOSUB
111100
N = VAUAS)
136
IF
N=1lI
OR
N=l
THEN
CLS
GOTO
134
142
NP
= 0 :
NC
= 0 :
LAST
=
SC
145
CLS
150
NP
= NP+l
160
FOR
1=1
TO
L
170
A(I)
= INT( N*RND(N) ) + 1
180
FOR
J=l
TO
150
:
NEXT
J
19111
SOUND
61l11l11l1-A(I)*51l1Il1t21l1
200
NEXT
I
300
PRINT
"Enter
sequence"
310
C = 0 :
FOR
1=1
TO
L
320
A$=INKEYS :
IF
AS=""
GOTO
320
322
IF
A$("l"
OR
A$)"8"
GOTO
320
324
SOUND
6000-(ASC(AS)-48)*500t20
330
Y(
I)
= ASC(AS) -
48
340
IF
Y(I)(>A(I)
THEN
C=l
350
NEXT
I
360
IF
C=l
GO
TO
500
400
PRINT
'Hili
PR
I
NT
"C
0 R R E C T
!"
420
NC
= NC+l
189