A fun and interactive Memory Matching Game built using React + Vite. Flip cards, match pairs, and test your memory skills!
- 🎴 Flip cards with smooth UI
- 🔀 Random card shuffling every game
- 🧩 Match logic with score tracking
- 📊 Move counter
- 🔒 Prevents rapid clicks during evaluation
- 🎉 Win message when all cards are matched
- ♻️ Reset / Restart game anytime
- React (Functional Components + Hooks)
- Vite (Fast development build tool)
- CSS (Custom styling)
memory-cards/
│
├── public/
├── src/
│ ├── assets/ # Images & icons
│ ├── components/ # UI Components
│ │ ├── Card.jsx
│ │ ├── GameHeader.jsx
│ │ └── WinMessage.jsx
│ ├── hooks/ # Custom logic
│ │ └── useGameLogic.js
│ ├── App.jsx # Main component
│ ├── index.css # Styles
│ └── main.jsx # Entry point
│
├── package.json
└── README.md
-
Cards are shuffled randomly at the start.
-
Player clicks a card → it flips.
-
Player selects a second card:
- ✅ If both match → they stay flipped
- ❌ If not → they flip back after a short delay
-
Moves are counted for every attempt.
-
Game ends when all pairs are matched.
git clone https://github.com/your-username/memory-cards.git
cd memory-cardsnpm installnpm run dev- Click on any card to flip it
- Match all pairs to win
- Use Reset button to restart the game
![Memory Card Game Screenshot]
- ⏱️ Timer feature
- 🏆 High score system
- 🎚️ Difficulty levels (easy/medium/hard)
Built as a learning project to practice:
- React Hooks
- State management
- Component structure
- Game logic implementation
This project is open-source and free to use.
Made with ❤️ by Dishitha 😄 Feel free to improve and expand it!
