A retro grid-based game in vanilla JavaScript, HTML and CSS.
MemoriseIT is an engaging, web-based memory card matching game that challenges your concentration and cognitive skills.
The game presents you with a grid of cards, each displaying an image when flipped.
Your goal is to find and match pairs of identical cards hidden within the grid. By flipping two cards at a time, you try to memorize their positions and match them.
The game rewards sharp memory, quick thinking, and attention to detail.
for loops
addEventListener
setAttribute
getAttribute
data-name
document.querySelector
createElement
Once the game begins, all cards are laid out face down on the screen. The cards are shuffled randomly, so each playthrough is unique.
Click on a card to reveal the image hidden on the other side. Then, click on a second card to reveal another image.
If the two flipped cards show the same image, they remain flipped, indicating a successful match. If the cards do not match, they flip back to their original state, and you must try again.
For each successful match, you earn points, and a message is displayed on the screen and the score is incremented by "1". If your attempt is incorrect, a alert like "Oops! The match is incorrect 😢" will appear, encouraging you to keep trying.
The game ends when all pairs are successfully matched. A congratulatory message will display, celebrating your victory.
The objective of MemoriseIT is to match all the pairs of cards as quickly as possible, while improving your memory and focus.
Download the zip file of the code and extract it.
Open the code in VsCode or any other ide and load the images.
Run the code and you are good to go