Poker Game
This is the rule of the game :
The player is dealt two cards, the 'hole'. Five 'community' cards are then dealt. The player hand is then the best possible five card hand that can be made with the two hole cards and the five community cards.
Is anyone here have the scripts ?please help me.....
Try poker-eval pretty much covers what you want and is fast. But it is written in C has almost zero documentation and is a bit of a pain to get set up as a DLL.
Alternatively there is a C# project on codesource that has ported it from C. It's a bit slower but easier to get working.
Additionally there are many Java progs around (several on SourceForge) these tend to be a lot slower than poker-eval. According to what I've read the reason that poker-eval is faster is that it uses large lookup tables for evaluating and comparing hands rather than calculating on the fly such things as the best 5 card hand from the 7 cards provided.
Uhmm, if you want to build up your own look-up code, you could use something called 'dyanmic programming', used in problems such as calculating minimal sets of coins for returning change. It works by calculating few results, and then building upon these to create a bigger look-up table.
For example, you could use simple code to find a pair, then use that result to find two pairs. Same for three of a kind, use in a full house, etc.
I'm not completly sure if this will work as expected on this particular problem, but you can always try it and see :)