10 REM " MINI-MEMORY " Ch.W.Brederode
, LISSE 1988, The Netherlands.
15 REM This is Public Domain
16 ON ERROR RUN
17 *KEY10 OLD|M VDU7:RUN|M
20 MODE2:HIMEM=&2A00:IF L% THEN 40
30 *LOAD MINIKRT
40 DIM A%14,SC%(1):CLS
45 SC%(0)=0:SC%(1)=0:D%=RND(-TIME)
50 D%=0:G%=0:J%=0:L%=1:O%=0:NR=0
51 VNR=255:IF Z%=255 THEN 100
55 COLOUR3
60 PRINTTAB(3,12)"MINI-MEMORY"'" ``
`````````"
70 PRINTTAB(3,19)"explanation? Y/N";
80 Q$=GET$:IF INSTR("Yy",Q$) MODE6:HI
MEM=&2A00:PROCuitleg:MODE2:HIMEM=&2A00
85 COLOUR3
90 PRINTTAB(3,12)"MINI-MEMORY"'" ``
`````````"
100 REM --- schudden ---
110 FOR N%=2 TO 13:A%?N%=(N%/2)-1:NEXT
120 FOR N%=14 TO 4 STEP-1:R%=RND(N%-2)
+1:A%?N%=A%?R%
130 FOR M%=R% TO N%-2:A%?M%=A%?(M%+1):
NEXT
140 NEXT:A%?3=A%?2:A%=A%+3:CLS
150 REM --- teken speelveld ---
160 GCOL0,1
170 FOR X=4 TO 1279 STEP318:MOVEX,110:
DRAWX,974:NEXT
180 FOR Y=110 TO 974 STEP288:MOVE4,Y:D
RAW1279,Y:NEXT
190 COLOUR6:FOR X=2 TO 17 STEP5:FOR Y=
6 TO 24 STEP9
200 PRINTTAB(X,Y)"?":NEXT:NEXT:COLOUR3
205 IF Z%=255 THEN595
210 X%=2:Y%=9:*FX4,1
220 REPEAT
230 REM --- wie aan de beurt? ---
240 IF J%AND1 PRINTTAB(13,30)">" ELSE
PRINTTAB(5,30)"<"
250 REM --- cursor ---
260 REPEAT
270 PRINTTAB(X%,Y%);
280 Q%=GET:IF Q%=13 UNTILTRUE:GOTO360
290 IF Q%<136 OR Q%>139 THEN280
300 Q%=Q%-135:ON Q% GOTO 310,320,330,3
40
310 X%=X%-5-5*(X%=2) :UNTILFALSE
320 X%=X%+5+5*(X%=17):UNTILFALSE
330 Y%=Y%+9+9*(Y%=27):UNTILFALSE
340 Y%=Y%-9-9*(Y%=9) :UNTILFALSE
350 REM --- volgnr en plaatje ---
360 NR=4*(Y%DIV9)-4+(X%DIV5):N%=A%?NR:
PRINTTAB(8,30);L%;
370 IF D%AND1 THEN 430
380 REM --- 1e kaart ---
390 IF N%=255 SOUND1,-1,200,1:UNTILFAL
SE
400 PROCplaatje:G%=N%:VNR=NR:D%=D%+1:S
%=X%:T%=Y%
410 UNTILFALSE
420 REM --- 2e kaart ---
430 IF N%=255 SOUND1,-1,200,1:UNTILFAL
SE
440 IF NR=VNR SOUND1,-1,200,1:UNTILFAL
SE
450 PRINTTAB(5,30)" ":PRINTTAB(13,30)"
"
460 L%=L%+1:PROCplaatje:U%=X%:V%=Y%:D%
=D%+1
470 IF N%=G% O%=1:A%?NR=255:A%?VNR=255
:SC%(J%AND1)=SC%(J%AND1)+1
480 PRINTTAB(1,30);SC%(0):PRINTTAB(16,
30);SC%(1):PRINTTAB(X%,Y%);
490 REM --- terugdraaien ---
500 Q=INKEY(500)
510 IF O% V$=" ":O%=0 ELSE V$="?":J%=J
%+1
512 B%=S%*64-96:H%=1244-T%*32
513 MOVEB%,H%:PLOT3,256,0:PLOT83,-256,
-256:PLOT83,256,0
514 B%=U%*64-96:H%=1244-V%*32
515 MOVEB%,H%:PLOT3,256,0:PLOT83,-256,
-256:PLOT83,256,0
520 COLOUR6
530 PRINTTAB(S%,T%-3)V$
540 PRINTTAB(U%,V%-3)V$
550 COLOUR3:UNTIL SC%(0)+SC%(1)=6
560 REM --- nog een keer? ---
570 PRINTTAB(1,28)"ONCE MORE? Y/N";
580 Q$=GET$:IF INSTR("Yy",Q$) Z%=0 ELS
E Z%=255
590 RUN
592 REM --- einde! ---
595 VDU23,1,0;0;0;0; :SOUND1,-3,154,1
:*FX4
596 FOR NR=0TO11:N%=A%?NR:PROCplaatje
597 SOUND1,-3,150-4*NR,1:NEXT:Z%=0
598 PRINTTAB(1,30)"SEE YOU LATER! ";
599 VDU23,1,1;0;0;0;
600 Q=GET:END
610DEFPROCplaatje
615 LOCAL M%,W%,B%,H%,P%
620 M%=&3000+1296+(NR DIV4)*5760+(NR M
OD4)*160
630 P%=&2A00+N%*256
640 FOR B%=0 TO 15:W%=M%+B%*8:FOR H%=0
TO 7
645 W%?0=?P%:W%?1=?P%:W%?2=?P%:W%?3=?P
%:P%=P%+1
646 W%?4=?P%:W%?5=?P%:W%?6=?P%:W%?7=?P
%:P%=P%+1
647 W%=W%+640:NEXT:NEXT
670 ENDPROC
680DEFPROCuitleg
685 VDU19,1,3,0,0,0
690 PRINT'"MINI-MEMORY FOR ONE OR TWO
PLAYERS"
700 PRINT"============================
========"
710 PRINT'"Each player searches two
matching"
720 PRINT'"cards with the SAME figure.
"
730 PRINT'"Use the cursor-keys for
searching"
740 PRINT'"and turn the cards with RET
URN."
750 PRINT'"He who finds two the same
cards may"
760 PRINT'"go once more."
770 PRINT'"The computer keeps up the
score and"
780 PRINT'"shows with < or > who's t
urn it is."
800 PRINT'''" Press
any key...";:Q=GET
810 ENDPROC