The task of writing a game page is ridiculously simple if you want to stick to the default functionality of the Explorer Solitaire library. Simply copy the Standard template below into a new file, change the values marked in Bold to the name of your game, and voila - you have a fully functional game on your hands.
Heaving a contented sigh, you dash off your game to Mr. Conner, with a note telling him to get your payment ready. But it's never that easy, is it? Conner's reply states that, while the game behaves like he expected, there is one drawback. Empty Tableaux piles should be filled automatically from the Reserve pile, if there are any cards left in the Reserve. If the user can choose his own foundation base card in the beginning stages of the game, then the chances of his winning increase dramatically. And, while the House does like people to win once in a while, we wouldn't want that to become a regular feature would it?
And what about scoring. The customer will expect to see his current earnings on screen won't he? Surely you don't expect him to calculate the numer of cards on the Foundations by himself.
The Explorer Solitaire library does not inherently support the functionality desired by your client. But you can use a technique known as Function Overloading to implement it anyway. In the next page, we will take a look at how this works.
Page 1:Using the Explorer Solitaire library
© 1997-2000 InsideDHTML.com, LLC. All rights reserved.