Original Post
Hello people, I'm doing a Texas Hold'em implementation of Poker. I've been studying the game and it's great. Texas Hold'em is just like regular poker, except that only 2 cards are dealt to each player, and then 5 "community" cards that are available to all players to use to make the best 5 card hand, that is they can use any of their 2 cards and any of the 5 cards on the table to create the best 5 card poker hand. My main problems I need to solve are the following: 1. Since the player has 7 cards, I need to figure out what combination of 5 cards out of 7 cards makes up the best possible hand. 2. Compare all best possible hands of each player, to figure out the winner. 3. Tell the player what kind of a hand he has, some don't know the rules and I want to print somewhere on the screen "You have a pair of aces", or "You have a flush, king high.". So I need to create a textual description of the hand. Since Texas Hold'em is a iterative game, that is; you start with 2 cards, then 3 cards are dealt to the table, then 1 more card, and then the final 1 card. So you have to create a textual description of the hand 4 times (when you have 2 cards, 5 cards, 6 cards and then 7 cards.) I hope this makes any sense. Anything will help me: - Articles - Tutorials - Code - Papers