Matching Cards

In-game screen.

Program listing on 48K Spectrum.

Text Listing

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

Download the game

About the game

In this game, there is a set of shuffled playing cards hidden in a grid of 52 positions. The goal is to find all of the matching pairs of playing cards from the shuffled pack. Although the suit of each card is not directly shown, it is sufficient for this game that all hearts and diamonds cards are shown in red, whilst all clubs and spades cards are shown in black. A pair of cards is matched if their rank and colour are both the same. The player can only choose one card at a time, by inputting a number in the range 1 to 52. If the chosen card matches the previous one, both cards remain permanently on the screen, with their positional numbers removed, as they can no longer be selected again. Otherwise, the new card remains on screen, the previous card is hidden, and the player must choose again another card trying to match it with the latest one. 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.

The precursor to this game was a collaborative effort between Einar Saukas and Digital Prawn. It was called "Memory test - single letter version" and was a letter based game. That game in itself was ultimately derived from the game which was an early version of memory (also downloadable from this site), but modified to allow a single selection per turn, rather than forcing two selections per turn as memory does. All of the work converting the above letter based game into this card based game including graphics, colour changes, and further optimisations was done by Einar Saukas.

Back to Sinclair stuff index