Classic Computer Magazine Archive COMPUTE! ISSUE 17 / OCTOBER 1981 / PAGE 117

MATCH — A Game Of Memory And Timing

Ron Walker
Smithville, Ontario

There are nine different skill levels to this game, with level one being the most difficult and nine being the easiest.

The object of the game is to repeat a pattern of musical notes and cursor positions that are randomly selected by the computer. Sounds simple, but at the highest level, the notes occur so rapidly that only the sharpest of minds can cope with it. Try it.

NOTE: Any numbers in brackets in quotes in the program listing are the number of blank spaces to leave. The "rvs" means leave one reverse space. Also, any words on brackets are what they say they are. e.g. PRINT "(clear" means to clear the screen (esc-shift-clr) etc. Good luck.

100 OPEN#1, 4, 0, "K:"
110 GRAPHICS 0 : POKE752, 1 : DIM NT(4), HOR(4), VIR(4), CHIME(50)
120 DIMA$(40) : A$ = " (39) "
130 POSITION 15, 6 : PRINT"MATCH"
140 POSITION 10, 16 : PRINT"ENTER LEVEL (1 - 9)"
150 GET#1, VAR : TRAP 510 : LEVEL = VAL(CHR$(VAR)) * 10
160 FOR X = 1 TO 4 : READ A, B, C : NT(X) = A : HOR(X) = B : VIR(X) = C : NEXTX
170 DATA 10, 19, 4, 50, 9, 12, 100, 29, 12, 150, 19, 21
180 PRINT " (CLEAR)" : FOR X = 5 TO 20 : POSITION 19, X : PRINT"/" : NEXTX
190 FOR X = 10 TO 20 : POSITION X, 12 : PRINT"-" : NEXTX : POSITION 19, 12 : PRINT"+"
200 POSITION 2, 0 : PRINT"HERE ARE THE NOTES:" : FORDELAY = 1 TO 500 : NEXTDELAY : POSITION 2, 0 : PRINTA$
210 FOR X = 1 TO 4 : POSITION HOR(X), VIR(X) : PRINT"RVS" : GOSUB 470 : POSITION HOR(X), VIR(X) : PRINT" "
215 NEXT X
220 POSITION 2, 0 : PRINT"PRESS BUTTON TO START WITH YOUR FIRST NOTE" : SOUND 0, 0, 0, 0
230 IFSTRIG (0) <> 0THEN230
240 POSITION 0, 0 : PRINTA$ : PRINTA$
250 GUESS = 1 : CHIME(GUESS) = INT(RND(1) * 4) + 1
260 FOR X = 1 TO GUESS : GOSUB 440 : NEXTX : SOUND0, 0, 0, 0
270 POSITION 1, 22 : PRINT"YOUR TURN. PRESS BUTTON TO START"
280 IF STRIG(0) <> 0 THEN 280
290 POSITION 1, 22 : PRINT" (DELETE LINE) ENTER NOTES"
300 FOR X = 1 TO GUESS : POKE 77, 0
310 TONE = STICK(0) : SOUND 0, 0, 0, 0
320 IF TONE = 14 THEN TONE = 10 : GOTO 370
330 IF TONE = 13 THEN TONE = 150 : GOTO 370
340 IF TONE = 7 THEN TONE = 100 : GOTO 370
350 IF TONE = 11 THEN TONE = 50 : GOTO 370
360 GOTO 310
370 IFNT(CHIME(X)) = TONE THEN GOSUB 440 : GOTO 400
380 GOTO 410
400 NEXT X : GOTO 480
410 PRINT"(CLEAR)NOT QUITE RIGHT. YOU GOT" ;GUESS;" NOTES IN A ROW" : PRINT "TRY AGAIN?"
420 GET#1, VAR : IFVAR = 89 THEN GRAPHICS 0 : END
430 GOTO 180
440 SOUND0, NT(CHIME(X)), 10, 10
450 POSITIONHOR(CHIME(X)), VIR(CHIME(X)) : PRINT"RVS" : FORDELAY = 1 TO LEVEL : NEXT DELAY
460 POSITIONHOR(CHIME(X)), VIR(CHIME(X)) : PRINT" " : RETURN
470 SOUND0, NT(X), 10, 10 : FORDELAY = 1 TO 500 : NEXTDELAY : RETURN
480 GUESS = GUESS + 1 : SOUND0, 0, 0, 0 : POSITION 1, 22 : PRINTA$
490 POSITION 1, 0 : PRINT"OK SO FAR. NOW I ADD ANOTHER ONE" : CHIME(GUESS) = INT (RND(1) * 4) + 1
500 FORDELAY = 1 TO 500 : NEXTDELAY : POSITION0, 0 : PRINTA$ : GOTO 260
510 PRINT"A NUMBER!" : FORDE = 1 TO 500 : NEXTDE : PRINT"(UP) (14)" : GOTO140