previous

page 22

next

I think we're ready to upgrade to 16 cards - what do you think?

So we need to pick 16 suitable cards.
A little care is needed to make sure we have 8 pairs.
I chose 8 cards from the first 13 then added 26 to each for the second 8.
Here's what I used:

var arr=[6,7,8,9,10,11,12,1,32,33,34,35,36,37,38,27];

Don't forget to change the 4 to 16 in the for loop.

Notice that I've resisted the temptation to add the shuffling to make testing easier.
I'll leave it to you to add shuffling when you're sure that what we have so far works.

So "What next?", I hear you ask.

Our program is far from bulletproof. See how many things you can find that are wrong with it or could be improved from a player's point of view.

previous
next