Results 1 to 1 of 1
Thread: Texas Hold'em Poker
- 05-05-2011, 05:40 AM #1Member
- Join Date
- May 2011
- Rep Power
Texas Hold'em Poker
I am trying to build a poker game but I need help building the classes that will evaluate which player has the best hand. At showdown, I need to call a method that will test to see which of the remaining players in the pot has the best hand.
I want a method where I can pass an array of 7 cards in and then for it to return a value indicating the strength of a players hand which can then be compared with the other players after they have also had their hand strength tested using the same method. This way the winner will be determined based on this value.
For example, if the player has a royal flush, the value returned will be 1 and if the player has a straight flush with King high then the value will be 2 and so on. Therefore the player with the lowest value returned will be the winner of the hand.
The cards are currently in a string format "Ace of Spades", "King of Clubs", "Two of Diamonds" etc...
When the cards are dealt they are dealt into variables, for example...
p1c1 is the variable for Player 1 Card 1
p1c2 is the variable for Player 1 Card 2
flop1 is the variable for Flop card 1
flop2 is the variable for Flop card 2
flop3 is the variable for Flop card 3
turn is the variable for Flop card 4
river is the variavle for Flop card 5
When I call the method to evaluate the hand value, I am hoping that I can call it like this:
However, I will first test to see which players are left in the pot and only determine the value of their hand if they are in the pot and then after the evaluation, I will determine who has the lowest value and therefore the winner.
Any help would be great
- By Ana Patel in forum Jobs OfferedReplies: 0Last Post: 02-11-2011, 07:00 AM
- By borris83 in forum Jobs OfferedReplies: 0Last Post: 12-17-2010, 11:23 PM
- By StateofMind in forum New To JavaReplies: 4Last Post: 04-06-2010, 08:59 PM
- By ckrisasa in forum NetworkingReplies: 8Last Post: 12-03-2009, 01:59 PM
- By ScottSearch in forum Jobs OfferedReplies: 0Last Post: 09-22-2008, 09:06 PM