Now comes the really tricky part - what next?
Once again it makes sense to list the steps in English before trying to program them.
Here's my list:


  1. Hide the buttons until we're ready.
  2. Reveal the key cards (1 & 4).
  3. Wait 2 seconds.
  4. Turn all the cards over.
  5. pick0()
  6. Show the new g_card[0].
  7. Wait 3 seconds.
  8. Move the cards.
  9. When the move has finished, show the buttons.

The catch is, JavaScript doesn't have a wait function so we'll have to get a bit creative with setTimeout. For the moment just put the waits in as comments. You should be able to complete button_click even if you can't test it yet.


It's fairly long so I'll save mine till the next page.