Skip to content

Puzzle / memory

Memory Pairs (Matching) Board Game

Tested with ChatGPT · produced Circuit Memory

The Prompt

Build a classic memory matching-pairs game as one self-contained HTML file (inline CSS/JS, no libraries, no external images — draw all card faces with CSS or inline SVG).

Spec:
- Grid: 4x4 on first board (8 pairs), growing to 4x5 after the first win.
- Cards flip with a CSS 3D flip animation; flipped pairs that match stay revealed with a glow; non-matches flip back after a 750ms delay and input locks during that window.
- Score = moves taken; show a star rating (3 stars under 12 moves, 2 under 18, else 1) plus elapsed time.
- Win overlay with stars, time, moves and a "Play again" button; everything restartable without reloading the page.
- Card faces: [describe a light theme, e.g. "circuit board symbols in a teal/cyan palette on a dark navy background"].
- Fully responsive: grid scales on phones, cards remain tappable (min ~44px targets), works with mouse and touch.
- Accessible: cards are real <button> elements with aria-labels; keyboard playable with Tab and Enter.

After the code, list the exact selectors/classes for the card element so the art can be re-themed easily.

What This Prompt Produces

Memory pairs is the friendliest genre for AI generation — expect a near-complete build in one pass. Circuit Memory came from this prompt, run with GPT-5.2 in Think mode, which reasoned through the flip-lock edge cases before writing a line of code.

Modification Tips

  • Keep the input lock during flip-back or double-clicks will cheat the game — the prompt enforces it, verify it.
  • Swap the bracketed theme sentence for any visual style; the logic is unaffected.
  • Add "shuffle a fixed set of symbols with no duplicates" to guarantee a valid board every time.
  • Fixed numbers are why the first build works — GPT-5.2 in Think mode implements the 750ms flip-back and 12-move star threshold exactly as written.

The Game This Prompt Produced

Want to try it? Open ChatGPT, paste the prompt, and you'll have a playable game in minutes. When you're happy with the result, submit it to Daily AI Games.