com.asdf.plugins.pokergames.texasholdem.bots
Class HandEvaluator

java.lang.Object
  extended by com.asdf.plugins.pokergames.texasholdem.bots.HandEvaluator

public class HandEvaluator
extends java.lang.Object

Class for comparing hands

Author:
teemu

Constructor Summary
HandEvaluator()
          Default constructor
 
Method Summary
 double handRank(Card c1, Card c2, Hand board, int opps)
          Calculates the probability of having the best hand against random opponents
 double potential(Card c1, Card c2, Hand bd, boolean positive)
           
 int rankHand(Card c1, Card c2, Hand board)
          Gives a numerical ranking of the hand
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HandEvaluator

public HandEvaluator()
Default constructor

Method Detail

rankHand

public int rankHand(Card c1,
                    Card c2,
                    Hand board)
Gives a numerical ranking of the hand

Parameters:
c1 - Hole card 1
c2 - Hole card 2
board - Current board
Returns:
The numerical ranking of the hand

handRank

public double handRank(Card c1,
                       Card c2,
                       Hand board,
                       int opps)
Calculates the probability of having the best hand against random opponents

Parameters:
c1 - Hole card 1
c2 - Hole card 2
board - Current board
opps - Number of opponents
Returns:
hand strength

potential

public double potential(Card c1,
                        Card c2,
                        Hand bd,
                        boolean positive)