A Game of Cards?

Several years ago, I made a computer card game called SevenUp. It’s a game my family played when I was a child, and I have always loved the game. As it turns out, SevenUp is not the real name of the game, that’s just what we called it. The real name is just Sevens, or Fan Tan.

In any case, I wanted to make the game for the computer, and as I was programming in Delphi at the time, Delphi being the best programming tool in it’s day, I wrote it in Delphi. There is a link to the game on the right side of this page, and at the top of this post, for you to download. I would love to upgrade the game, but I am afraid that I have long since lost the source code for it. Any updates to the game will require a complete rewrite. And that is my intention.

When I was writing this program, I searched the web for some pre-packaged card deck component that I could use. I found one that I really liked. It was a component called TPlayingCard by Simon Fitch, and I gave him credit in the documentation for the game.

As time moved on, Microsoft came out with Visual Studio .Net, and it included the C# language. It pained me to admit it, but I liked it better than Delphi. And of course, the first project I set out to make was my favorite card game, Sevens. My strategy for presenting the cards changed a little, however, and instead of compiling a card deck into the program, I chose to write a wrapper for the Cards.dll that shipped with Windows.

The wrapper worked wonderfully, and I even improved on the algorithm I used for playing the game. I never finished the game, however, because school became a priority for me. Then, after I graduated, I became lazy (as indicated in my previous post).

During this lazy period, Microsoft came out with their latest OS, Vista. Vista was different from Windows XP in a number of ways, but the one difference that was relevant to my card game was that it doesn’t ship with Cards.dll. Instead, it has a CardGames.dll, which is used by the card games that ship with Vista.

So, my dilemma is, do I stick with old technology and port the Cards.dll with my game? Do I find another card component that works with .Net? Or do I try to find a way to make use of the CardGames.dll that ships with Vista?

I would love to learn to make use of the latest resources, but alas, I have search the web for any information on CardGames.dll, and have found nothing. So I tried peaking into the dll myself, and what I found is not promising. It seems that the CardGames.dll file was made specifically for the the games that ship with Vista. I don’t think that the dll is a general purpose library, like the Cards.dll was. It is still possible that it may contain some general purpose functions, but at this time I don’t feel it is worth the effort.

As for finding another card component, I don’t look forward to the research process. Having to test a number of different components to see which ones I like. Cluttering my hard drive with half a dozen packages that I will never use again, along with the test apps I will need to write to test them with. And if the one I like happens not to be free, having to pay for the licensing for it.

I think that for the short term, I will port the Cards.dll from Windows XP. Just so I can finish the program. Of course, then my target audience will be pre-Vista Windows users ( I am sure that Microsoft would not want the Cards.dll to be bundled with other peoples games).

There is a fourth option. There are Starter Kits for Visual Studio .Net. One of the starter kits is a blackjack card game, and the cards can be adapted for other games. Unfortunately, the cards are not bundled in objects, the way I would want them to be, and so it would be a major effort to make the cards workable for me. Still, if I can get the game working with the old Cards.dll first, perhaps I can come back later and retrofit the starter kit cards into my game.

All the possibilities…


Comments are closed.