# VBForums CodeBank > Codebank - Game Programming >  [VB6] Scoring Poker Hands

## leinad31

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

Moved to Games Programming CodeBank

----------


## leinad31

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

> Thanks Hack. I didn't know there was a more appropriate subsection.
> 
> I've updated the code...


No problem.

In keeping with this 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

Sorry Hack, forgot to remove the exe.

I'll update this to a class when I have spare time.

----------

