Memory Game (due 26 Oct 2016)

Create a DHTML Memory Game using JQuery. Upon loading the page, a square grid of 16 blocks is visible. Clicking on a block shows a letter or a number on the block. Only two blocks can show letters or numbers at a given time. If the two blocks with the same letters appear they remain visible for the remainder of the game. If the text on the two blocks are different they disappear in 3 seconds. Any clicks during this time period (3 seconds from the clicking of the first block) is ignored. The game is over when all identical pairs are matched. Create an alert box that pops up that indicates the number of tries by the user. A try is the click of the first block in the 3 second period. Your end result will look like this:

8 4 7 2
1 6 5 3
7 2 3 8
6 5 4 1

Possible Scenarios:

What if the user clicks just once?
The text on the block that he has clicked is revealed for 3 seconds and then the text disappears. It is counted as one try.
What if the user clicks once and the second click is after 3 seconds?
The text on the block clicked first should have disappeared. The text on the second block appears. This block is now taken as the first block and it is exposed for 3 seconds. Within that time the user can click again.
What if the user clicks 2 or more blocks within the 3 second period from the clicking of the first block?
Only the second box clicked shows the text. The subsequent clicks are ignored and not counted towards the number of tries.
What happens if the user clicks two blocks that have the same letter or number during the 3 second period?
The text on both the blocks remain visible, i.e. the text does not disappear after the 3 second period.
What happens if the user clicks on a block that has a revealed text on it?
The click is ignored. It is not counted towards the number of tries the user made.

You have to do the problem in several parts.

Even though, JavaScript has two Window methods that are capable of calling a function after a set amount of time - setTimeout() and setInterval(), use jQuery functions instead - fadeIn() and fadeOut().

The intent of this assignment is to use jQuery functions. If you are ambitious, you may use images instead of text. Also you should shuffle the images every time the page gets loaded.

Your page will be minimalistic but aesthetic. When you are finished with the assignment, please put a link in the table in your index.html page by 11 PM Wednesday, 26 Oct 2016.