
previous

page 12
next
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:
- Hide the buttons until we're ready.
- Reveal the key cards (1 & 4).
- Wait 2 seconds.
- Turn all the cards over.
- pick0()
- Show the new g_card[0].
- Wait 3 seconds.
- Move the cards.
- 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.
previous
next