Program listing on 48K Spectrum.
1 POKE 23693,48: CLS : RANDOMIZE : DIM c(52): DIM s(2): FOR b=0 TO 51: LET p=INT (b/10): PRINT AT p*3+2,1+3*b-30*p;b+1: LET f=.5+RND*(b+1): LET c(b+1)=c(f): LET c(f)=65+INT (b/2): NEXT b: LET p=1+(p=1): BORDER p*(b>0): INK p: PRINT AT 18+p,1;"P";p;":";s(p): LET f=f=0: IF b THEN INPUT STR$ b+CHR$ 6 AND f;a: POKE (a<1 OR a>52 OR a=b*f)*23620,18: POKE (c(a)=0)*23620,18: RESTORE : READ q,r,w,v,y,x,m,s,c(a),c(b),s(p),b: PRINT INVERSE m;AT 1+w*3,v;CHR$ q;AT 1+y*3,x;CHR$ r AND m: BEEP f/2,24*m-12: FOR d=1 TO 150*f: NEXT d: PRINT OVER f=m;AT 1+w*3,v;" ";AT 1+y*3,x;" ": POKE 23620,14-f*s: DATA c(a),c(b),INT (a/10-.1),3*a-30*w-2,INT (b/10-.1),3*b-30*y-2,q=r*f,m=0,s*q,s*r,s(p)+m,a*(s(1)+s(2)<26) |
The game ends when all 26 matching pairs have been revealed, and the player with the highest score is declared the winner. The game is declared a draw if both players have the same score (i.e. 13 points each).