A fun and interactive memory card game built using React, Vite, and Tailwind CSS. Match pairs of cards by flipping them, and challenge yourself to complete the game with fewer attempts and a faster time!
- Randomized Card Shuffle: Cards are shuffled each time the game starts.
- Flip and Match: Click to flip cards and match pairs.
- Timer: Tracks the time taken to complete the game.
- Attempts Tracker: Displays the number of attempts made.
- Difficulty Levels: Choose between Easy, Medium, and Hard modes.
- New Game Button: Restart the game at any time.
- Dynamic Gameplay: The timer starts when the first card is flipped.
- Responsive Design: Optimized for various screen sizes.
- React: For building the user interface.
- Vite: As the build tool for fast development and bundling.
- Tailwind CSS: For efficient and modern styling.
-
Clone the Repository:
-
Navigate to the Project Directory:
cd memory-game
-
Install Dependencies:
npm install
-
Start the Development Server:
npm run dev
-
Open your browser and navigate to the local server URL provided by Vite (e.g.,
http://localhost:5173).
- Select a difficulty level:
- Easy: 4 pairs
- Medium: 6 pairs
- Hard: 8 pairs
- Click on a card to flip it and reveal its icon.
- Flip another card to try matching the first one.
- If the icons match, the cards remain flipped. Otherwise, they will flip back after a short delay.
- The game ends when all pairs are matched.
- View your stats:
- Time taken to complete the game.
- Number of attempts made.
- Icons: Modify the icons in the
generateCardsfunction inApp.jsxto use different symbols or images. - Styling: Customize the Tailwind CSS classes in the components for a unique design.
This project is open-source and available under the MYLICENSE.