|
-
Jul 10th, 2004, 07:42 PM
#1
Thread Starter
Member
Tricky Logic Challenge
I have been working on a problem that I thought I would give you guys a shot at. I have found it much more challenging than it appears.
You have a normal 52 card playing deck, with no jokers.
You have between 5 and 7 random cards that make up your hand.
ex: AS, 5D, 3H, 9H, 9C, 6S, 2C
The problem is to create a sub that determines, with the random cards, if you have either a straight or a chance to make a straight.
Draws include:
X=Card that helps the straight
0=Card that dosent help the straight
XXXXX - Straight
0XXXX0 - Double Chance Straight
X0XXX0X - Double Chance Straight
X0XXX - One Chance Straight
XX0XX - One Chance Straight
XXX0X - One Chance Straight
**Additional Challenge**
Determine if the straight or straight draw is a straight flush draw. (All cards that make the straight are of the same suit.)
I have been working on this for two days and am stumped.
Thanks for the help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|