Program listing on 48K Spectrum.
1 BORDER 4: POKE 23693,33: CLS : RANDOMIZE : DIM c(53): FOR l=0 TO 51: PRINT AT INT (l/10)*3+2,3*l-30*INT (l/10);l+1: LET a=.5+RND*(l+1): LET c(l+1)=c(a): LET c(a)=1+INT (l/2): NEXT l: LET t=0: LET b=53: PRINT INVERSE 1;AT 20,0;" Lives:";l,"Score:";t;" Won!" AND t=26,: IF l*(t<26) THEN INPUT a: POKE (a<1 OR a>52 OR a=b)*23620,15: POKE (c(a)=0)*23620,15: RESTORE : READ q,r,i,y,x,w,v,m,s,c(a),c(b),b,l,t: PRINT PAPER 7; INK 2*i;AT y,x;"23456789%JQKA"(q-13*i);" ";AT y+1,x;" ": BEEP .5,24*m-12: FOR d=1 TO 150: NEXT d: PRINT AT w+m*(y+2-w),v+m*(x-v);" ";AT w+1+m,v;" ": POKE 23620,14-m: DATA c(a),c(b),q>13,3*INT (a/10-.1),3*a-10*y-3,3*INT (b/10-.1),3*b-10*w-3,q=r,m=0,s*q,s*r,a,l-s+m,t+m |
The number of lives increases for each matched card and decreases otherwise. The game ends when either all matching pairs have been found, resulting in a winning score of 26, or all lives have been lost, losing the game.