The purpose of this was to practice using the DOM and the browser's local storage.
This is a single page app of a pair-matching game. The game starts off with several pairs of cards of colors faced down. Clicking on a card reveals the color. After clicking on a second card, if the colors don't match, then the cards' colors will be hidden again. A score is tallied during play, and the best score across plays will be saved in the browser's local storage and shown on the webpage.
The randomization and the HTML creation of the cards were already provided. I added the logic for interacting with the cards, keeping track of matched cards, checking the win condition, all of scoring, and all of the CSS.
Tools used:
- HTML 5
- CSS 3
- JavaScript ECMAScript 2018