com.biotools.meerkat
Interface HandEval


public interface HandEval

An interface for Plug-in Hand Evaluation engines. A Hand Evaluator takes as input a poker hand (5 to 7 cards) and returns a unique integer rank for the best poker hand made from those cards, such that any hand that beats another hand is assigned a strictly larger integer. Any hands that tie would be assigned identical integers. Exposes special rankHand calls for specific hand sizes so that special optimizations can be done for each case.


Method Summary
 int rankHand(Hand h)
          Rank the hand
 int rankHand5(Hand h)
          Rank the 5-card hand
 int rankHand6(Hand h)
          Rank the 6-card hand
 int rankHand7(Hand h)
          Rank the 7-card hand
 

Method Detail

rankHand

int rankHand(Hand h)
Rank the hand

Parameters:
h - a poker hand with 5,6, or 7 cards
Returns:
the unique integer rank of the best hand

rankHand7

int rankHand7(Hand h)
Rank the 7-card hand

Parameters:
h - a poker hand with exactly 7 cards
Returns:
the unique rank of the best 5-card hand made from the 7 cards

rankHand6

int rankHand6(Hand h)
Rank the 6-card hand

Parameters:
h - a poker hand with exactly 6 cards
Returns:
the unique rank of the best 5-card hand made from the 6 cards

rankHand5

int rankHand5(Hand h)
Rank the 5-card hand

Parameters:
h - a poker hand with exactly 5 cards
Returns:
the unique rank of the 5-card hand