A beautiful, modern memory card game built with React, TypeScript, and Tailwind CSS. Features multiple themes, AI opponents, and local multiplayer support.
- Single Player vs AI - Challenge AI opponents with adjustable difficulty
- Player vs Player - Local multiplayer for two players
- AI vs AI - Watch AI players compete against each other
- Light - Clean and bright interface
- Dark - Modern dark theme
- Minimalist - Simple and clean design
- Cyberpunk - Futuristic neon aesthetics
- Neon - Bright glowing colors
- Forest - Natural green tones
- Multiple difficulty levels (Easy, Medium, Hard, Expert)
- Smart AI that learns and adapts
- Realistic thinking delays for natural gameplay
- Multiple Board Sizes - 3x4, 4x4, 5x4, 6x4, 6x6
- Match Types - Color matching and pattern matching
- Statistics Tracking - Track your progress and achievements
- Achievement System - Unlock achievements as you play
- Sound Effects - Immersive audio feedback
- Animations - Smooth Framer Motion animations
- Responsive Design - Works on all screen sizes
- Node.js (v18 or higher)
- npm or yarn
-
Clone the repository
git clone https://github.com/yourusername/memory-card-game.git cd memory-card-game -
Install dependencies
npm install
-
Start the development server
npm start
-
Open your browser Navigate to
http://localhost:3000
npm run buildThis builds the app for production to the build folder.
- Choose a game mode - Single player, multiplayer, or AI vs AI
- Select your preferences - Board size, difficulty, theme
- Start playing - Click cards to flip them and find matching pairs
- Win the game - Match all pairs to complete the game
- Players take turns flipping two cards
- If cards match, the player keeps the pair and gets another turn
- If cards don't match, they flip back and turn passes to next player
- Player with the most pairs wins!
- Frontend Framework: React 18 with TypeScript
- Styling: Tailwind CSS
- Animations: Framer Motion
- Icons: Lucide React
- Build Tool: Create React App
- Code Quality: ESLint, TypeScript strict mode
src/
├── components/ # React components
│ ├── GameBoard.tsx # Main game board component
│ ├── Card.tsx # Individual card component
│ ├── GameSettings.tsx # Game configuration
│ └── ...
├── hooks/ # Custom React hooks
│ ├── useGameLogic.ts # Main game logic
│ ├── useAI.ts # AI logic
│ └── ...
├── utils/ # Utility functions
│ ├── gameLogic.ts # Core game mechanics
│ ├── aiLogic.ts # AI algorithms
│ └── ...
├── types/ # TypeScript type definitions
└── styles/ # CSS and styling
The game includes 6 beautiful themes:
| Theme | Description |
|---|---|
| Light | Clean, bright interface with blue gradients |
| Dark | Modern dark theme with blue accents |
| Minimalist | Simple, clean design with minimal colors |
| Cyberpunk | Futuristic theme with neon colors and dark background |
| Neon | Bright, glowing colors with electric aesthetics |
| Forest | Natural theme with green tones and earthy colors |
The AI system features:
- Multiple Difficulty Levels with different strategies
- Memory Simulation - AI remembers previously seen cards
- Realistic Delays - Natural thinking time
- Strategic Play - Prioritizes certain moves based on difficulty
Track your progress with:
- Games played and won
- Best completion times
- Win streaks
- Achievement unlocks
Immersive sound effects for:
- Card flips
- Successful matches
- Button clicks
- Game completion
Fully responsive design that works on:
- Desktop computers
- Tablets
- Mobile phones
- Different screen orientations
npm start- Runs the development servernpm test- Launches the test runnernpm run build- Builds the app for productionnpm run eject- Ejects from Create React App (one-way operation)
- TypeScript - Full type safety
- ESLint - Code linting and formatting
- Strict Mode - Enhanced error checking
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
⭐ Star this repository if you found it helpful!