Memory Check ๐ง A fun, interactive memory card game built with HTML, CSS, and JavaScript.
๐ฏ Overview Players flip over two cards per turn to find matching pairs. The game ends when all pairs are matched, with moves and time tracked to measure performance.
๐ธ Demo
๐ Features Shuffle & Deal: Cards are randomized each game
Match Detection: Flips two cards, checks for matches
Move & Timer Tracking: Displays number of moves taken and total time
Win Popup: Shows performance stats and offers replay
Responsive UI: Works across desktop and mobile browsers
โ Installation Option A: Play Locally Clone the repo:
bash Copy Edit git clone https://github.com/yourusername/memory-check.git cd memory-check Open index.html in your browser.
Option B: Use a Local Server (for modules or assets) bash Copy Edit
๐ฎ How to Play Click (or tap) a card to flip it over.
Flip a second card:
Match? Cards stay face up.
No match? They flip back after a short delay.
Continue until all pairs are matched.
On winning, a modal shows:
Number of moves
Time taken
Option to restart
โ๏ธ Game Logic Core files:
index.html โ game markup
style.css โ styling and animations
app.js โ shuffle, flip logic, matching, and state control
Key Logic Snippets js Copy Edit // Shuffle cards cards = cards.sort(() => 0.5 - Math.random());
// On card click: if (!firstCard) { firstCard = clicked; } else { secondCard = clicked; checkForMatch(); }
// Check match: if (firstCard.dataset.name === secondCard.dataset.name) { disableCards(); } else { unflipCards(); } ๐งฉ Customization Change grid size by adjusting cardsArray.
Swap card images by adding assets and updating data attributes.
Modify timer/moves thresholds for difficulty levels.
Add sound on flip or match by integrating audio elements.
๐ ๏ธ Tech Stack Vanilla JavaScript
CSS3 for layout and animations
HTML5 with data-* card tagging
๐ฏ Goals & Learnings This project helped with:
DOM manipulation for interactive UIs
Game state management (tracking first/second card, matches)
CSS transitions and delayed actions
Responsive design techniques
๐ฆ Future Enhancements Local High Scores via localStorage
Animations and more elegant flip effects
Difficulty Levels (e.g., grid sizes like 4ร4, 6ร6)
Touch input improvements for mobile
Multiplayer mode โ turn-based scoring
โ๏ธ Contributing Fork the repo
Create a feature branch
Submit a PR for review
Contributions toward features, bug fixes, or UI improvements are all welcome!
๐ License This project is MIT licensed. See the LICENSE file for details.
UI design ideas from susanschen/MemoryโGame


Log in or sign up for Devpost to join the conversation.