Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27467

VS 2010 Array.Sort help

$
0
0
I have a text box with a seven card poker hand (2 hole cards + Flop + Turn + River)
Example: 41C 37C 29D 17C 13D 13C 05C - - (I'm using the first 13 prime #'s for Rank)

I'm working on determining if hand is a flush (no prob there), however, if I have a
flush, I'm trying to determine, (if more than one flush), which player would have
the higher flush. If the highest flush cards are in on the board and not the hole
cards..... getting off point here lol

what I've got so far is I created a suit variable and a rank variable.

If I
Array.Sort(suit)
Array.Reverse(suit)

results: DDDDDCC
which is fine, but is there a way to get the same sort with the
corresponding rank, ie: 41C37C17C13C05C29D13D

If I could get these hand results I could easily loop through
and determine the winner (highest cards) also determine
very easily if a Royal Flush is present

Right now I'm trying to use the Array.Sort(Array,Array) syntax
or Array.Sort(Rank,Suit), but I'm not making any headway.

Am I on the right Track with this syntax or is this whole thing
not possible??

Thanks for any answers, suggestions or help

Tahoeclf

P.S. I can provide some code if necessary!

Viewing all articles
Browse latest Browse all 27467

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>