Dealing cards

R

RobcPettit

Hi, could somebody in the right direction to write a program to deal
cards. What I want to do is:
With an 8 deck of cards. I know the player has an ace, the dealer has a
2, is deal every possible scenario, going player,banker then dealer. Up
to max 3 cards each. Also there be rules for when the banker takes a
card or not. Eg if the palyers dealt another ace, then deal all posible
cards for dealer with 2A, and out comes. Thaen again for Player A2 etc,
through to AK. Starting agian with 22 for dealer etc. At the momment Im
using excel to do this, but its slow.
Regards Robert
 
M

Morten Wennevik

Hi Robert,

Are you perchance trying to calculate the probability of who is the most
likely winner, or just need a program that keeps track of which cards have
already been dealt?

The latter is easy if you use a List or ArrayList and just remove the card
as it is dealt. The former is quite a bit more complex.

This article may give you some useful hints, if not the solution.

http://www.codeproject.com/csharp/blackjack.asp
 
R

RobcPettit

Thakyou for your reply. Yes Im trying to calculate the likely winner,
and the odds to match. Thanks for the link, should keep me busy for a
while.
Regards Robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top