View Single Post
  #2  
Old 08-05-2005, 11:28 AM
TheTROLL TheTROLL is offline
Senior Member
 
Join Date: Feb 2005
Location: London
Posts: 103
Default Re: Programming - Ranking Hands (C#)

The function

private void EvaluateHand(Hand h)

in PokerGames5Cards.cs appears to be the relevant one, it takes a hand object as an argument and sets the type property to one of the type enums.

Nothing too earth-shattering about the approach, just works down from Royal Flush to High Card stopping at the first match. It looks like the hand object can hold more than five cards, but the way of selecting the best 5-card hand from them is rubbish - it just tries every combination.
Reply With Quote