[RESOLVED] Problem with my memory game
It is supposed to flip over 2 cards, check for equality, and dim the cards if they are a match or flip them back over if they arent. It only flips over one card and stays like that. Doesnt let you click any card after that.
Or heres the files zipped into a folder so you can see the problem for yourself
The function uncover(card) seem to rewrite...
At first, card is an object. There is no need to take is id (with firstUncoveredId = card.id) (the first character of an id has to be a letter) to get this object with a first = document.getElementById(firstUncoveredId); which give obviously the card object !
Then, you can distinguish the second click only with a variable which store the number of the first image (or -1 in your case) ... Here is an old memory which can be rewrite to be more explicit.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)