Results 1 to 2 of 2

Thread: [RESOLVED] Problem with my memory game

  1. #1
    Join Date
    Mar 2012

    resolved [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


  2. #2
    Join Date
    Oct 2010
    Versailles, France
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center