Flip cards to find matching pairs — train your memory!
This memory game implements a classic card-matching algorithm using CSS 3D transforms for realistic card-flip animations with hardware-accelerated perspective rendering. The game engine uses Fisher-Yates shuffle for cryptographically fair card distribution, ensuring each game layout is genuinely random. State management tracks flipped cards, matched pairs, and timing through a lightweight reactive architecture — no external framework dependencies. The 3D card animation uses backface-visibility and rotateY transforms computed by the GPU for smooth 60fps transitions even on mobile devices.
Real-world use cases:
This tool is part of the FAK LAB ecosystem, founded by Faizan Ahmad Khan Khichi. The memory game runs 100% client-side with zero network requests during gameplay. Your best scores are stored exclusively in your browser's localStorage — no personal data, gameplay statistics, or behavioral patterns are ever transmitted to external servers. The game requires no login, no account creation, and collects no analytics.
The game uses the Fisher-Yates (Knuth) shuffle algorithm with Math.random() as the entropy source. Each emoji is duplicated to create pairs, then the array is shuffled in-place by swapping elements from the end to a random earlier position. This guarantees uniform distribution — every possible card arrangement has equal probability of appearing.
Yes. Your best score (lowest move count) is persisted in your browser's localStorage under the key "memory_best_moves". This data survives browser restarts and tab closures but is device-specific. Clearing your browser data will reset your records. No scores are uploaded or synced across devices.
Absolutely. The responsive grid layout adapts to any screen size using CSS Grid with auto-fill columns. Touch events are handled natively through click listeners. The 3D card-flip animations use GPU-accelerated CSS transforms (transform: rotateY) for smooth performance even on lower-powered mobile processors. The aspect-ratio property ensures cards remain square regardless of viewport dimensions.