I've implemented a Texas Hold'em game using C#.
I wrote classes like Card, Deck, Player, Table etc...
For example:
Player player1 = new Player("player1");
player1.Card1 = new Card(4, Symbol.Clubs, true);
player1.Card2 = new Card(5, Symbol.Clubs, true);
Card card1 = new Card(4, Symbol.Clubs, true);
Card card2 = new Card(7, Symbol.Hearts, true);
Card card3 = new Card(2, Symbol.Spades, true);
Card card4 = new Card(4, Symbol.Diamonds, true);
Card card5 = new Card(4, Symbol.Clubs, true);
Card[] tableCards = {card1, card2, card3, card4, card5};
I've also wrote some methods for evaluate cards array, like IsFlush, IsStraight, IsPair and so on.
My question is how should I pick the best hand combination if I got 7 cards(2 hand, 5 from the table).
In this code example it's {4,4,4,4,7}.