Memory games get sold as pure concentration. The rules that actually decide your result are structural, and this engine fixes all of them. How many shapes exist, how long you see a wrong pair, and which number the game saves as your record are all in the source.
The three boards and their exact pair counts
The difficulty table defines three boards. Easy is a 4 by 4 grid with 8 pairs. Medium is 6 by 4 with 12 pairs. Hard is 6 by 6 with 18 pairs.
The shape pool holds exactly 18 shapes, and the deal takes them in order. Easy plays the first 8, which are circle, square, triangle, star, heart, diamond, hexagon, and pentagon. Medium adds cross, arrow, moon, and sun. Hard uses all 18, adding lightning, cloud, flower, bell, note, and crown.
One structural fact follows. No shape ever appears in two different pairs on any difficulty, because each pair index takes one shape. When you have seen the crown on a hard board, exactly one other crown exists. Every shape works this way, on every board the engine can generate.
Cards are dealt with a Fisher-Yates shuffle, so every arrangement is equally likely and no layout is biased.
The timing rules that shape play
A flip runs at 4 flips per second, so a card turns over in 0.25 seconds. When your two cards do not match, they stay face up for a full 1.0 second before flipping back. That gives you about 1.25 seconds of guaranteed study time per wrong pair, animation included.
A move is counted the moment your second card flips. Input locks while the pair resolves, and a match settles after 300 milliseconds. Fast play means deciding your next card during that lock rather than after it.
The click rules also protect you in two ways. Clicking a card already face up does nothing, and clicking the same card you just flipped is rejected, so a move always involves two distinct cards. You cannot waste a move on a double tap, which makes fast clicking safe on any difficulty.
The saved record is time, not moves
The timer starts on your first card click and stops when the last pair lands. Best times are stored per difficulty in your browser under the key memory_best. Move counts appear on the win screen but are never saved.
This changes the correct strategy. A slow thorough sweep that minimizes moves loses to a fast sweep with a few extra wrong pairs. Optimize recall speed, not move elegance.
A scan strategy that fits the engine
- [ ] Fix one reading order, rows left to right, top to bottom, and keep it for the whole game.
- [ ] Flip two unseen cards per move in that order, so each move reveals two new cards.
- [ ] Take a known match the moment a new card matches one you have already seen.
- [ ] Use each 1.0 second mismatch window to name both shapes and their positions aloud.
- [ ] Stop scanning the instant every card has been seen, then clear the known pairs at full speed.
- [ ] On hard, watch the six late shapes from lightning through crown, since they appear in no easier difficulty.
The counting works like this. On hard, 18 two-card moves see all 36 cards at most, and some of those moves already close pairs. After the sweep, every remaining pair is a known match worth one quick move. Your total is the sweep plus one move per pair it failed to close, and nothing more.
The same counting holds on the smaller boards. Easy needs at most 8 sweep moves to see all 16 cards, and medium needs at most 12 to see all 24. If your move counts on the win screen sit far above those numbers plus the leftover pairs, your scan order is unstable, and that is the first thing to fix before chasing times.
What difficulty actually changes
Only three things change between boards. The pair count rises from 8 to 12 to 18. The grid widens from 4 to 6 columns, so cards shrink, because the layout caps card size and divides the remaining space. The shape set grows, so hard asks you to separate 18 symbols instead of 8. The flip, lock, and timing rules stay identical across all three.
Pick your board by recall style. If you remember positions well, hard rewards you with a longer stable game. If you remember symbols better than positions, easy and medium keep the board small enough that one sweep usually closes several pairs on its own.
Honest downsides. There is no hint, no peek, and no partial credit. The 1.0 second flip back window is fixed, so players who need longer to encode 18 shapes leak time on hard. Best times live only in local storage, so clearing your browser erases every record.
Open the [Memory Match game](/en/memory-match), run one hard board with the fixed scan order, and note your time. If the fixed order beats or loses to your usual style, send both times and your pair count, because reader data decides whether we publish a follow-up on scan orders.