Property | Type | Description | |
---|---|---|---|
CLUB_OFFSET | int | ||
CardJoker | int | ||
CardMasksTable | ulong[] | ||
CardTable | string[] | ||
Clubs | int | ||
DIAMOND_OFFSET | int | ||
Diamonds | int | ||
HEART_OFFSET | int | ||
Hearts | int | ||
NCardsWJoker | int | ||
NumberOfCards | int | ||
Rank2 | int | ||
Rank3 | int | ||
Rank4 | int | ||
Rank5 | int | ||
Rank6 | int | ||
Rank7 | int | ||
Rank8 | int | ||
Rank9 | int | ||
RankAce | int | ||
RankJack | int | ||
RankKing | int | ||
RankQueen | int | ||
RankTen | int | ||
SPADE_OFFSET | int | ||
Spades | int |
Method | Description | |
---|---|---|
BitCount ( ulong bitField ) : int |
Fast Bitcounting method (adapted from snippets.org)
|
|
CardRank ( int card ) : int |
Given a card value, returns it's rank
|
|
CardSuit ( int card ) : int |
Given a card value, returns it's suit
|
|
CompareTo ( object obj ) : int |
Used to compare one hand to another. This method allows normal compare functions to work as expected with a hand.
|
|
DescriptionFromHand ( string hand ) : string |
Takes an string describing a hand and returns the description.
|
|
DescriptionFromHandValueInternal ( uint handValue ) : string | ||
DescriptionFromMask ( ulong cards ) : string |
|
|
Equals ( object obj ) : bool |
Test for equality
|
|
Eval ( string hand ) : uint |
Evaluates a hand (passed as a string) and returns a hand value. A hand value can be compared against another hand value to determine which has the higher value.
|
|
Eval ( ulong cards ) : uint |
Evaluates a hand (passed as a hand mask) and returns a hand value. A hand value can be compared against another hand value to determine which has the higher value.
|
|
Eval ( ulong cards, int numberOfCards ) : uint |
Evaluates a hand (passed as a hand mask) and returns a hand value. A hand value can be compared against another hand value to determine which has the higher value.
|
|
Evaluate ( string pocketCardsStr, string boardStr, string deadStr ) : EvaluationPocket | ||
EvaluateType ( ulong mask ) : HandTypes |
Evaluates the card mask and returns the type of hand it is. This function is faster (but provides less information) than Evaluate or Evaluate.
|
|
EvaluateType ( ulong mask, int cards ) : HandTypes |
This function is faster (but provides less information) than Evaluate or Evaluate.
|
|
GapCount ( ulong mask ) : int |
Counts the number of empty space between adjacent cards. 0 means connected, 1 means a gap of one, 2 means a gap of two and 3 means a gap of three.
|
|
GetHashCode ( ) : int |
Returns hash code
|
|
Hand ( ) : System |
Default constructor
|
|
Hand ( string pocket, string board ) : System |
Constructor
|
|
HandOdds ( string pockets, string board, string dead, long wins, long ties, long losses, long &totalHands ) : void |
Used to calculate the wining information about each players hand. This function enumerates all possible remaining hands and tallies win, tie and losses for each player. This function typically takes well less than a second regardless of the number of players.
|
|
HandPlayerOpponentOdds ( string pocketcards, string boardcards, double &player, double &opponent ) : void |
Given a set of pocket cards and a set of board cards this function returns the odds of winning or tying for a player and a random opponent.
|
|
HandPlayerOpponentOdds ( ulong ourcards, ulong board, double &player, double &opponent ) : void |
Given a set of pocket cards and a set of board cards this function returns the odds of winning or tying for a player and a random opponent.
|
|
HandPotential ( ulong pocket, ulong board, double &ppot, double &npot ) : void |
Returns the positive and negative potential of the current hand. This funciton is described in Aaron Davidson's masters thesis (davidson.msc.pdf).
|
|
HandType ( uint handValue ) : uint | ||
Hands ( int numberOfCards ) : IEnumerable |
Enables a foreach command to enumerate all possible ncard hands.
|
|
Hands ( ulong shared, ulong dead, int numberOfCards ) : IEnumerable |
Enables a foreach command to enumerate all possible ncard hands.
|
|
IsConnected ( ulong mask ) : bool |
Returns true if the cards in the two card hand are connected.
|
|
IsSuited ( ulong mask ) : bool |
This function returns true if the cards in the hand are all one suit
|
|
Mask ( int index ) : ulong |
This is a fast way to look up the index mask.
|
|
MaskToString ( ulong mask ) : string |
Turns a card mask into the equivalent human readable string.
|
|
NextCard ( string cards, int &index ) : int |
Parses Card strings (internal)
|
|
Outs ( ulong player, ulong board ) : int |
Returns the number of outs possible with the next card.
|
|
OutsMask ( ulong player, ulong board ) : ulong |
Creates a Hand mask with the cards that will improve the specified players hand against a list of opponents or if no opponents are list just the cards that improve the players current had. Please note that this only looks at single cards that improve the hand and will not specifically look at runner-runner possiblities.
|
|
ParseCard ( string card ) : int |
Reads an string definition of a card and returns the Card value.
|
|
ParseHand ( string hand ) : ulong |
Parses an string description of a hand and returns a hand mask.
|
|
ParseHand ( string hand, int &cards ) : ulong |
|
|
ParseHand ( string pocket, string board, int &cards ) : ulong |
This static method parses the passed pocket cards and board and produces a card mask.
|
|
PocketHand169Type ( ulong mask ) : PocketHand169Enum |
Given a pocket pair mask, the PocketPairType cooresponding to this mask will be returned.
|
|
RandomHands ( int ncards, double duration ) : IEnumerable |
Iterates through random hands that meets the specified requirements until the specified time duration has elapse. Please note that this iterator requires interop. If you need and interop free hand evaluator you should remove this function along with the other interop functions in this file.
|
|
RandomHands ( int ncards, int trials ) : IEnumerable |
Iterates through random hands with ncards number of cards. This iterator will return the number of masks specifed in trials. Masks can be repeated.
|
|
RandomHands ( ulong shared, ulong dead, int ncards, double duration ) : IEnumerable |
Iterates through random hands that meets the specified requirements until the specified time duration has elapse. Please note that this iterator requires interop. If you need and interop free hand evaluator you should remove this function along with the other interop functions in this file.
|
|
RandomHands ( ulong shared, ulong dead, int ncards, int trials ) : IEnumerable |
This function iterates through random hands returning the number of random hands specified in trials. Please note that a mask can be repeated.
|
|
ToString ( ) : string |
Returns the string representing the hand.
|
|
TopCard ( System hv ) : uint | ||
ValidateHand ( string hand ) : bool |
This function takes a string representing a full or partial holdem hand and validates that the text represents valid cards and that no card is duplicated.
|
|
ValidateHand ( string pocket, string board ) : bool |
This function takes a string representing pocket cards and a board and then validates that the text represents a valid hand.
|
|
operator ( ) : bool |
Test for inequality.
|
Method | Description | |
---|---|---|
CardMask ( ulong cards, int suit ) : uint | ||
DescriptionFromHandValue ( uint handValue ) : string | ||
Eval ( string pocketCardsStr, IEnumerable |
||
FIFTH_CARD ( System hv ) : uint | ||
FOURTH_CARD ( System hv ) : uint | ||
GetRandomHand ( ulong dead, int ncards, |
Returns a rand hand with the specified number of cards and constrained to not contain any of the passed dead cards.
|
|
HANDTYPE_VALUE ( HandTypes ht ) : uint | ||
HandPotentialOpp ( ulong ourcards, ulong board, ulong oppcards, int index, int &HP ) : void |
Internal function used by HandPotential.
|
|
MaskToDescription ( ulong mask ) : string | ||
QueryPerformanceCounter ( long &lpPerformanceCount ) : bool | ||
QueryPerformanceFrequency ( long &lpFrequency ) : bool | ||
SECOND_CARD ( System hv ) : uint | ||
SECOND_CARD_VALUE ( System c ) : uint | ||
THIRD_CARD ( System hv ) : uint | ||
THIRD_CARD_VALUE ( System c ) : uint | ||
TOP_CARD_VALUE ( System c ) : uint | ||
UpdateHandMask ( ) : void |
Updates handmask and handval, called when card strings change
|
public static BitCount ( ulong bitField ) : int | ||
bitField | ulong | ulong to count |
return | int |
public static CardRank ( int card ) : int | ||
card | int | card value |
return | int |
public static CardSuit ( int card ) : int | ||
card | int | Card value |
return | int |
public CompareTo ( object obj ) : int | ||
obj | object | object to compare against |
return | int |
public static DescriptionFromHand ( string hand ) : string | ||
hand | string | the string describing the hand |
return | string |
public static DescriptionFromHandValueInternal ( uint handValue ) : string | ||
handValue | uint | |
return | string |
public static DescriptionFromMask ( ulong cards ) : string | ||
cards | ulong | |
return | string |
public static Eval ( string hand ) : uint | ||
hand | string | hand string |
return | uint |
public static Eval ( ulong cards ) : uint | ||
cards | ulong | hand mask |
return | uint |
public static Eval ( ulong cards, int numberOfCards ) : uint | ||
cards | ulong | hand mask |
numberOfCards | int | number of cards in the hand |
return | uint |
public static Evaluate ( string pocketCardsStr, string boardStr, string deadStr ) : EvaluationPocket | ||
pocketCardsStr | string | |
boardStr | string | |
deadStr | string | |
return | EvaluationPocket |
public static EvaluateType ( ulong mask ) : HandTypes | ||
mask | ulong | card mask |
return | HandTypes |
public static EvaluateType ( ulong mask, int cards ) : HandTypes | ||
mask | ulong | card mask |
cards | int | number of cards in mask |
return | HandTypes |
public static GapCount ( ulong mask ) : int | ||
mask | ulong | two card hand mask |
return | int |
public Hand ( string pocket, string board ) : System | ||
string | Pocket Cards | |
board | string | Board |
return | System |
public static HandOdds ( string pockets, string board, string dead, long wins, long ties, long losses, long &totalHands ) : void | ||
pockets | string | Array of pocket hand string, one for each player |
board | string | the board cards |
dead | string | the dead cards |
wins | long | An array of win tallies, one for each player |
ties | long | An array of tie tallies, one for each player |
losses | long | An array of losses tallies, one for each player |
totalHands | long | The total number of hands enumarated. |
return | void |
public static HandPlayerOpponentOdds ( string pocketcards, string boardcards, double &player, double &opponent ) : void | ||
pocketcards | string | Pocket cards in ASCII |
boardcards | string | Board cards in ASCII |
player | double | Player odds as doubles |
opponent | double | Opponent odds as doubles |
return | void |
public static HandPlayerOpponentOdds ( ulong ourcards, ulong board, double &player, double &opponent ) : void | ||
ourcards | ulong | Pocket mask for the hand. |
board | ulong | Board mask for hand |
player | double | Player odds as doubles |
opponent | double | Opponent odds as doubles |
return | void |
public static HandPotential ( ulong pocket, ulong board, double &ppot, double &npot ) : void | ||
ulong | Hold Cards | |
board | ulong | Community cards |
ppot | double | Positive Potential |
npot | double | Negative Potential |
return | void |
public static HandType ( uint handValue ) : uint | ||
handValue | uint | |
return | uint |
public static Hands ( int numberOfCards ) : IEnumerable |
||
numberOfCards | int | the number of cards in the hand (must be between 1 and 7) |
return | IEnumerable |
public static Hands ( ulong shared, ulong dead, int numberOfCards ) : IEnumerable |
||
shared | ulong | A bitfield containing the cards that must be in the enumerated hands |
dead | ulong | A bitfield containing the cards that must not be in the enumerated hands |
numberOfCards | int | the number of cards in the hand (must be between 1 and 7) |
return | IEnumerable |
public static IsConnected ( ulong mask ) : bool | ||
mask | ulong | the hand to check |
return | bool |
public static IsSuited ( ulong mask ) : bool | ||
mask | ulong | hand to check for "suited-ness" |
return | bool |
public static Mask ( int index ) : ulong | ||
index | int | index of mask |
return | ulong |
public static MaskToString ( ulong mask ) : string | ||
mask | ulong | mask to convert |
return | string |
public static NextCard ( string cards, int &index ) : int | ||
cards | string | string containing hand definition |
index | int | iterator into card string |
return | int |
public static Outs ( ulong player, ulong board ) : int | ||
player | ulong | Players pocket cards |
board | ulong | THe board (must contain either 3 or 4 cards) |
return | int |
public static OutsMask ( ulong player, ulong board ) : ulong | ||
player | ulong | Players pocket cards |
board | ulong | The board (must contain either 3 or 4 cards) |
return | ulong |
public static ParseCard ( string card ) : int | ||
card | string | card string |
return | int |
public static ParseHand ( string hand ) : ulong | ||
hand | string | string descripton of a hand |
return | ulong |
public static ParseHand ( string hand, int &cards ) : ulong | ||
hand | string | |
cards | int | |
return | ulong |
public static ParseHand ( string pocket, string board, int &cards ) : ulong | ||
string | ASCII string representing pocket cards | |
board | string | ASCII string representing board |
cards | int | Number of cards represented in mask |
return | ulong |
public static PocketHand169Type ( ulong mask ) : PocketHand169Enum | ||
mask | ulong | |
return | PocketHand169Enum |
public static RandomHands ( int ncards, double duration ) : IEnumerable |
||
ncards | int | The number of cards in the returned hand. |
duration | double | The amount of time to allow the generation of hands to occur. When elapsed, the iterator will terminate. |
return | IEnumerable |
public static RandomHands ( int ncards, int trials ) : IEnumerable |
||
ncards | int | Number of cards required to be in the hand. |
trials | int | Number of total mask to return. |
return | IEnumerable |
public static RandomHands ( ulong shared, ulong dead, int ncards, double duration ) : IEnumerable |
||
shared | ulong | These cards must be included in the returned hand |
dead | ulong | These cards must not be included in the returned hand |
ncards | int | The number of cards in the returned random hand. |
duration | double | The amount of time to allow the generation of hands to occur. When elapsed, the iterator will terminate. |
return | IEnumerable |
public static RandomHands ( ulong shared, ulong dead, int ncards, int trials ) : IEnumerable |
||
shared | ulong | Cards that must be in the hand. |
dead | ulong | Cards that must not be in the hand. |
ncards | int | The total number of cards in the hand. |
trials | int | The total number of random hands to return. |
return | IEnumerable |
public static ValidateHand ( string hand ) : bool | ||
hand | string | hand to validate |
return | bool |
public static ValidateHand ( string pocket, string board ) : bool | ||
string | Pocket cards as a string | |
board | string | Board cards as a string |
return | bool |