Click to See Complete Forum and Search --> : [VB6] Scoring Poker Hands
leinad31
May 31st, 2006, 12:36 AM
Using 8 bytes to represent a card
Maintain an array for the deck of cards
Shuffling the deck/array
Dealing from the deck to two arrays (players 1 and 2 cards in hand)
Generating permutation for the cards in hand
Determining the best hand through "weight" computations
Hack
May 31st, 2006, 06:51 AM
Moved to Games Programming CodeBank
leinad31
May 31st, 2006, 09:47 AM
Thanks Hack. I didn't know there was a more appropriate subsection.
I've updated the code...
EDIT: and I've updated again. It now works properly for flush, straight flush and royal flush. Seems I forgot to update proc PrepHandArr() when I raised the 2nd dimension of the Hand() array. I corrected logical error in IsFlush() and IsStraight(). I also updated the GetHandName() proc.
Hack
May 31st, 2006, 09:55 AM
Thanks Hack. I didn't know there was a more appropriate subsection.
I've updated the code...No problem.
In keeping with this (http://www.vbforums.com/showthread.php?t=385758) CodeBank policy, your attachment has been edited and the executable file that was included has been removed.
Please place ONLY source code in your attachments. No form of executables (.exe, .dll, .ocx, etc) are permitted, and will be removed.
leinad31
May 31st, 2006, 12:36 PM
Sorry Hack, forgot to remove the exe.
I'll update this to a class when I have spare time.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.