Poker Hand Evaluation
I need some VB.NET code which will evaluate the strength of a single texas hold’em poker hand. It needs be able to identify the best hand available out of 7 cards dealt, but also to be able to evaluate the strength of a hand at each stage of the hand, so after the first two cards are dealt, after the flop, after the turn, and after the river. At each stage, it needs to be able to return:
1. The percentage likelihood of hitting:
a. A straight flush
b. Four of a kind
c. A fullhouse
d. A flush
e. A Straight
f. Three of a Kind
g. Two Pairs
h. One Pair
2. The overall percentage strength of the hand. For example. If the two player cards are King King, and the flop comes King King Ace, the player has an extremely strong hand, but could could still be beaten by a hand holding Ace Ace if one more Ace comes on the turn or the river, or it could be beaten by any hand holding an Ace, if the Turn and the River are both Aces. At each stage, the evaluator needs to return the percentage chance of there being a better hand than the one the player holds once all cards have been dealt.
This isn’t for a PokerBot or a multiple player hand evaluator, it’s just to return the strength of each given hand as a tool for teaching poker probability.
I’m aware there are some open source pieces of code out there but I don’t have the time to convert them to my exact needs, so I’m hoping someone has something similar already created. I need to be able to easily integrate the code with an existing VB.Net project.


