C# 클래스 HoldemHand.Hand

Represents a Texas Holdem Hand
상속: IComparable
파일 보기 프로젝트 열기: Ezakhiel/Donate-Money-For-Unicorns-ubbse2015 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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
TwoCardMaskTable ulong[]
TwoCardMaskTableSize int
nBitsAndStrTable UInt16[]

공개 메소드들

메소드 설명
BitCount ( ulong bitField ) : int

Count Bits. Optimized for cards so only works with 52 bits.

CardRank ( int card ) : int

Given a card value, returns it's rank

CardSuit ( int card ) : int

Given a card value, returns it's suit

Cards ( ulong mask ) : IEnumerable

This method allows a foreach statement to iterate through each card in a card mask.

CompareTo ( object obj ) : int

Used to compare one mask to another. This method allows normal compare functions to work as expected with a mask.

CountContiguous ( ulong mask ) : int

Returns the count of adjacent cards

CountContiguous ( ulong pocket, ulong board ) : int

Returns the count of adjacent cards

DescriptionFromHand ( string mask ) : string

Takes an string describing a mask and returns the description.

DescriptionFromHandValueInternal ( uint handValue ) : string
DescriptionFromMask ( ulong cards ) : string

Evaluates a hand and returns a descriptive string.

DetailedOddsWithMultiplePlayers ( string pocket, string board, ulong dead, int playerCount, double &playerodds, double &oppodds, double duration ) : void

Cacluates the approxamate odds that each player and opponent mask type has to win. This method uses Monte Carlo Analysis to determine a results. The quality of the result will depend on the amount of time allowed for the simulation.

DetailedOddsWithMultiplePlayers ( string pocket, string board, ulong dead, int playerCount, double &playerodds, double &oppodds, int trials ) : void

Cacluates the approxamate odds that each player and opponent mask type has to win. This method uses Monte Carlo Analysis to determine a results. The quality of the result will depend on the number of trials.

DetailedOddsWithMultiplePlayers ( ulong pocket, ulong board, ulong dead, int playerCount, double &playerodds, double &oppodds, double duration ) : void

Cacluates the approxamate odds that each player and opponent mask type has to win. This method uses Monte Carlo Analysis to determine a results. The quality of the result will depend on the amount of time allowed for the simulation.

DetailedOddsWithMultiplePlayers ( ulong pocket, ulong board, ulong dead, int playerCount, double &playerodds, double &oppodds, int trials ) : void

Cacluates the approxamate odds that each player and opponent mask type has to win. This method uses Monte Carlo Analysis to determine a results. The quality of the result will depend on the number of trials.

DrawCount ( string player, string board, string dead, Hand type ) : int

The method returns the number of draws that are possible for the specified HandType.

DrawCount ( ulong mask, ulong dead, Hand type ) : int

The method returns the number of draws that are possible for the specified HandType. Note that DrawCount(pocket, board, dead, type) is not necessarily the same as DrawCount(pocket | board, dead, type). This method returns all possible draws that are the same as the requested type.

DrawCount ( ulong player, ulong board, ulong dead, Hand type ) : int

The method returns the number of draws that are possible for the specified HandType. This method only returns the counts that improve the player's mask rather than just the board. Because of this subtle distinction, DrawCount(player, board, dead, type) doesn't necessarily return the same value as DrawCount(player | board, dead, type).

Equals ( object obj ) : bool

Test for equality

Evaluate ( string mask ) : uint

Evaluates a mask (passed as a string) and returns a mask value. A mask value can be compared against another mask value to determine which has the higher value.

Evaluate ( ulong cards ) : uint

Evaluates a mask (passed as a mask mask) and returns a mask value. A mask value can be compared against another mask value to determine which has the higher value.

Evaluate ( ulong cards, int nCards ) : uint

Evaluates a mask (passed as a mask mask) and returns a mask value. A mask value can be compared against another mask value to determine which has the higher value.

EvaluateType ( ulong mask ) : HandTypes

Evaluates the card mask and returns the type of mask 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.

FlushDrawCount ( ulong mask, ulong dead ) : int

Counts the number of hands that are a flush with one more drawn card.

FlushDrawCount ( ulong player, ulong board, ulong dead ) : int

Counts the number of hands that are a flush with one more drawn card. However, Flush hands that only improve the board are not considered.

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. This method calculates the results. Because of that equivelent call in PocketHands is preferred because it uses a lookup table and is faster. This function remains to allow for automated testing.

GetHashCode ( ) : int

Returns hash code

Hand ( ) : System

Default constructor

Hand ( string pocket, string board ) : System

Constructor

HandDistance ( ulong pocket, ulong board ) : long

This method returns the mask distance from the best possible mask given this board (no draws are considered). The value 0 is the best possible mask. The value 1 is the next best mask and so on.

HandPlayerMultiOpponentOdds ( ulong ourcards, ulong board, int numOpponents, double duration, double &player, double &opponent ) : void

HandPotential ( string pockethand, string boardhand, double &ppot, double &npot, int NOpponents, double duration ) : void

This method is similar to the HandPotential algorithm described in Aaron Davidson's masters thesis, however if differs in several significant ways. First, it makes the calculation while accounting for one or more opponents. Second, it uses the Monte Carlo technique to get answers in a reasonable amount of time (a duration of 0.1 seems to give reasonable results). And finally, the results are not normalized; the positive and negative potential is the actual odds of improvement or worsening of a mask.

HandPotential ( ulong pocket, ulong board, double &ppot, double &npot ) : void

Returns the normalized, positive and negative potential of the current mask. This funciton is described in Aaron Davidson's masters thesis on page 23.

HandPotential ( ulong pocket, ulong board, double &ppot, double &npot, int NOpponents, double duration ) : void

This method is similar to the HandPotential algorithm described in Aaron Davidson's masters thesis, however if differs in several significant ways. First, it makes the calculation while accounting for one or more opponents. Second, it uses the Monte Carlo technique to get answers in a reasonable amount of time (a duration of 0.1 seems to give reasonable results). And finally, the results are not normalized; the positive and negative potential is the actual odds of improvement or worsening of a mask.

HandStrength ( string pocketquery, string board, int NOpponnents, double duration ) : double

A HandStrength function that accounts for multiple opponents. This method uses the Monte Carlo menthod to calculate a value. It takes surprisingly little time to get good results. A duration of 0.01 seconds (10mS) returns good results, and a duration of 0.1 (100mS) returns even better results.

HandStrength ( ulong pocket, ulong board ) : double

The classic HandStrengh Calculation from page 21 of Aaron Davidson's Masters Thesis.

HandStrength ( ulong pocket, ulong board, int NOpponnents, double duration ) : double

HandType ( uint handValue ) : uint
HandWinOdds ( ulong ourcards, ulong oppcards, ulong board, double &player, double &opponent ) : bool

HandWinOdds ( 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.

HandWinOdds ( string ourcards, string board, double &player, double &opponent, int NOpponents, double duration ) : void

This method calculates the probablity of a player winning with specific hands and opponents winning with specific hands.

HandWinOdds ( string pockets, string board, string dead, long wins, long ties, long losses, long &totalHands ) : void

Used to calculate the wining information about each players mask. 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.

HandWinOdds ( 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.

HandWinOdds ( ulong ourcards, ulong board, double &player, double &opponent, int NOpponents, double duration ) : void

This method calculates the probablity of a player winning with specific hands and opponents winning with specific hands.

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.

IsBackdoorFlushDraw ( string pocket, string board, string dead ) : bool

Returns true if there are three cards of the same suit. The pocket cards must have at least one card in that suit.

IsBackdoorFlushDraw ( ulong pocket, ulong board, ulong dead ) : bool

Returns true if there are three cards of the same suit. The pocket cards must have at least one card in that suit.

IsConnected ( ulong mask ) : bool

Returns true if the cards in the two card mask are connected. This method calculates the results. Because of that equivelent call in PocketHands is preferred because it uses a lookup table and is faster. This function remains to allow for automated testing.

IsFlushDraw ( string pocket, string board, string dead ) : bool

Returns true if there are 4 cards of the same suit.

IsFlushDraw ( ulong mask, ulong dead ) : bool

Returns true if the hand is a flush draw.

IsFlushDraw ( ulong pocket, ulong board, ulong dead ) : bool

Returns true if there are 4 cards of the same suit.

IsGutShotStraightDraw ( string mask, string dead ) : bool

Return true if the combined cards contain a gut shot straight.

IsGutShotStraightDraw ( string pocket, string board, string dead ) : bool

Return true if the combined cards contain a gut shot straight.

IsGutShotStraightDraw ( ulong mask, ulong dead ) : bool

Return true if the combined cards contain a gut shot straight.

IsGutShotStraightDraw ( ulong pocket, ulong board, ulong dead ) : bool

Return true if the combined cards contain a gut shot straight.

IsOpenEndedStraightDraw ( string mask, string dead ) : bool

Returns true if the mask is an open ended straight draw.

IsOpenEndedStraightDraw ( string pocket, string board, string dead ) : bool

Returns true if the combined mask is an open ended straight draw.

IsOpenEndedStraightDraw ( ulong mask, ulong dead ) : bool

Returns true if the combined mask is an open ended straight draw.

IsOpenEndedStraightDraw ( ulong pocket, ulong board, ulong dead ) : bool

Returns true if the combined mask is an open ended straight draw. Only straight possiblities that improve the player's mask are considered in this method.

IsStraightDraw ( string mask, string dead ) : bool

Returns true if the passed mask only needs one card to make a straight. Note that the pocket cards must contains at least one card in the combined straight.

IsStraightDraw ( string pocket, string board, string dead ) : bool

Returns true if the passed mask only needs one card to make a straight.

IsStraightDraw ( ulong mask, ulong dead ) : bool

Returns true if the passed mask only needs one card to make a straight. Note that the pocket cards must contains at least one card in the combined straight.

IsStraightDraw ( ulong pocket, ulong board, ulong dead ) : bool

Returns true if the passed mask only needs one card to make a straight. Note that the pocket cards must contains at least one card in the combined straight.

IsSuited ( ulong mask ) : bool

This function returns true if the cards in the mask are all one suit. This method calculates the results. Because of the equivelent call in PocketHands is preferred because it uses a lookup table and is faster. This function remains to allow for automated testing.

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.

OutCards ( string player, string board ) : string

Returns a string of the possible outs for the next card. Note that cards that only help the board will be ignored.

Outs ( string player, string board ) : int

Returns the number of outs possible with the next card. Note that cards that only help the board will be ignored.

Outs ( ulong player, ulong board ) : int

Returns the number of outs possible with the next card.

OutsDiscounted ( ulong player, ulong board ) : int

Returns the number of discouted outs possible with the next card. Players pocket cards The board (must contain either 3 or 4 cards) A list of zero or more opponent cards. The count of the number of single cards that improve the current hand applying the following discouting rules: 1) Drawing to a pair must use an over card (ie a card higher than all those on the board) 2) Drawing to 2 pair / pairing your hand is discounted if the board is paired (ie your 2 pair drawing deat to trips) 3) Drawing to a hand lower than a flush must not make a 3 suited board or the board be 3 suited. 4) Drawing to a hand lower than a stright, the flop must not be 3card connected or on the turn allow a straight to be made with only 1 pocket card or the out make a straight using only 1 card. Function provided by Matt Baker.

OutsEx ( string pocket, string board, string dead ) : int

OutsEx ( ulong pocket, ulong board, ulong dead ) : int

OutsMask ( ulong player, ulong board ) : ulong

Creates a Hand mask with the cards that will improve the specified players mask 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 mask and will not specifically look at runner-runner possiblities.

OutsMaskDiscounted ( 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 hand. This implements the concept of 'discounted outs'. That is outs that will improve the players hand, but not potentially improve an opponents hand to an even better one. For example drawing to a straight that could end up loosing to a flush. Please note that this only looks at single cards that improve the hand and will not specifically look at runner-runner possiblities. Players pocket cards The board (must contain either 3 or 4 cards) A list of zero or more opponent pocket cards A mask of all of the cards that improve the hand applying the following discouting rules: 1) Drawing to a pair must use an over card (ie a card higher than all those on the board) 2) Drawing to 2 pair / pairing your hand is discounted if the board is paired (ie your 2 pair drawing deat to trips) 3) Drawing to a hand lower than a flush must not make a 3 suited board or the board be 3 suited. 4) Drawing to a hand lower than a stright, the flop must not be 3card connected or on the turn allow a straight to be made with only 1 pocket card or the out make a straight using only 1 card. Function provided by Matt Baker.

OutsMaskEx ( string pocket, string board, string dead ) : ulong

OutsMaskEx ( ulong player, ulong board, ulong dead ) : ulong

Creates a Hand mask with the cards that will improve the specified players mask. Please note that this only looks at single cards that improve the mask and will not specifically look at runner-runner possiblities. This version of outs contributed by Matt Baker

ParseCard ( string card ) : int

Reads an string definition of a card and returns the Card value.

ParseHand ( string mask ) : ulong

Parses an string description of a mask and returns a mask mask.

ParseHand ( string hand, int &cards ) : ulong

Parse Hand.

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 PocketHand169Enum cooresponding to this mask will be returned.

RandomHand ( Random rand, int ncards ) : ulong

This method will return a random mask with the number of cards specified.

RandomHand ( Random rand, string query, ulong dead, int ncards ) : ulong

This method will randomly chose a pocket mask from the query string that doesn't contain any of the specified dead cards. That pocket mask will be used as a set of shared cards that must be used in the final generated mask. The mask will contain the number of cards specified in the ncards argument.

RandomHand ( Random rand, ulong dead, int ncards ) : ulong

Returns a randomly generated mask that doesn't include any of the cards in the dead card mask. The mask will return the number of card in the ncards argument.

RandomHand ( Random rand, ulong list, ulong dead, int ncards ) : ulong

This method randomly picks from a list of possible masks.

RandomHand ( ulong dead, int ncards ) : ulong

RandomHand ( ulong list, ulong dead, int ncards ) : ulong

This method randomly picks from a list of possible masks.

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 mask 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 ( string query, ulong dead, int ncards, double duration ) : IEnumerable

Interate through the hands defined in the pocket mask definition.

RandomHands ( ulong list, ulong dead, int ncards, double duration ) : IEnumerable

Returns random hands out of the list of mask provided.

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.

StraightDrawCount ( ulong mask, ulong dead ) : int

The method returns the number of straight draws that are possible for the current mask.

StraightDrawCount ( ulong player, ulong board, ulong dead ) : int

The method returns the number of straight draws that are possible for the player and board configuration. This method filters the results so only player hand improvements are counted.

ToString ( ) : string

Returns the string representing the mask.

TopCard ( System hv ) : uint
UniqueHands ( ulong shared, int ncards ) : long

This method returns the number of unique mask values that can be made with ncards, where all of the hands contain the shared cards.

ValidateHand ( string hand ) : bool

This function takes a string representing a full or partial holdem mask 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 mask.

WinOdds ( string pocket, string board, int numOpponents ) : double

This method returns the approximate odd for the players mask winning against multiple opponents. This uses a default time duration of 0.25S (or 250mS) for the time allotment for Monte Carlo analysis.

WinOdds ( string pocketquery, string boardhand, string deadcards, int numOpponents, double duration ) : double

This method returns the approximate odd for the players mask winning against multiple opponents.

WinOdds ( string pocket, string board, ulong dead, int numOpponents ) : double

This method returns the approximate odd for the players mask winning against multiple opponents. This uses a default time duration of 0.25S (or 250mS) for the time allotment for Monte Carlo analysis.

WinOdds ( ulong pocket, ulong board, ulong dead ) : double

This method returns the exact odds of the specified mask mask winning against an average player. It's reasonably fast because it uses a lookup table when possible.

WinOdds ( ulong pocket, ulong board, ulong dead, int numOpponents ) : double

This method returns the approximate odd for the players mask winning against multiple opponents. This uses a default time duration of 0.1S (or 100mS) for the time allotment for Monte Carlo analysis.

WinOdds ( ulong pocket, ulong board, ulong dead, int numOpponents, double duration ) : double

This method returns the approximate odd for the players mask winning against multiple opponents.

operator ( ) : bool

Test for inequality.

비공개 메소드들

메소드 설명
CardMask ( ulong cards, int suit ) : uint
FIFTH_CARD ( System hv ) : uint
FOURTH_CARD ( System hv ) : uint
HANDTYPE_VALUE ( HandTypes ht ) : uint
NextCard ( string cards, int &index ) : int

Parses Card strings (internal)

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

메소드 상세

BitCount() 공개 정적인 메소드

Count Bits. Optimized for cards so only works with 52 bits.
public static BitCount ( ulong bitField ) : int
bitField ulong
리턴 int

CardRank() 공개 정적인 메소드

Given a card value, returns it's rank
public static CardRank ( int card ) : int
card int card value
리턴 int

CardSuit() 공개 정적인 메소드

Given a card value, returns it's suit
public static CardSuit ( int card ) : int
card int Card value
리턴 int

Cards() 공개 정적인 메소드

This method allows a foreach statement to iterate through each card in a card mask.
public static Cards ( ulong mask ) : IEnumerable
mask ulong
리턴 IEnumerable

CompareTo() 공개 메소드

Used to compare one mask to another. This method allows normal compare functions to work as expected with a mask.
public CompareTo ( object obj ) : int
obj object object to compare against
리턴 int

CountContiguous() 공개 정적인 메소드

Returns the count of adjacent cards
public static CountContiguous ( ulong mask ) : int
mask ulong Current Hand
리턴 int

CountContiguous() 공개 정적인 메소드

Returns the count of adjacent cards
public static CountContiguous ( ulong pocket, ulong board ) : int
pocket ulong Players pocket cards mask
board ulong Community card mask
리턴 int

DescriptionFromHand() 공개 정적인 메소드

Takes an string describing a mask and returns the description.
public static DescriptionFromHand ( string mask ) : string
mask string the string describing the mask
리턴 string

DescriptionFromHandValueInternal() 공개 정적인 메소드

public static DescriptionFromHandValueInternal ( uint handValue ) : string
handValue uint
리턴 string

DescriptionFromMask() 공개 정적인 메소드

Evaluates a hand and returns a descriptive string.
public static DescriptionFromMask ( ulong cards ) : string
cards ulong Card mask
리턴 string

DetailedOddsWithMultiplePlayers() 공개 정적인 메소드

Cacluates the approxamate odds that each player and opponent mask type has to win. This method uses Monte Carlo Analysis to determine a results. The quality of the result will depend on the amount of time allowed for the simulation.
public static DetailedOddsWithMultiplePlayers ( string pocket, string board, ulong dead, int playerCount, double &playerodds, double &oppodds, double duration ) : void
pocket string Players Hand
board string Current Board
dead ulong Dead Cards
playerCount int the number of players in the mask.
playerodds double The returned odds array for the player
oppodds double The returned odds array for the opponents
duration double The time allowed to run the simulation
리턴 void

DetailedOddsWithMultiplePlayers() 공개 정적인 메소드

Cacluates the approxamate odds that each player and opponent mask type has to win. This method uses Monte Carlo Analysis to determine a results. The quality of the result will depend on the number of trials.
public static DetailedOddsWithMultiplePlayers ( string pocket, string board, ulong dead, int playerCount, double &playerodds, double &oppodds, int trials ) : void
pocket string Players Hand
board string Current Board
dead ulong Dead Cards
playerCount int the number of players in the mask.
playerodds double The returned odds array for the player
oppodds double The returned odds array for the opponents
trials int The number of simulations to run.
리턴 void

DetailedOddsWithMultiplePlayers() 공개 정적인 메소드

Cacluates the approxamate odds that each player and opponent mask type has to win. This method uses Monte Carlo Analysis to determine a results. The quality of the result will depend on the amount of time allowed for the simulation.
public static DetailedOddsWithMultiplePlayers ( ulong pocket, ulong board, ulong dead, int playerCount, double &playerodds, double &oppodds, double duration ) : void
pocket ulong Players Hand
board ulong Current Board
dead ulong Dead Cards
playerCount int the number of players in the mask.
playerodds double The returned odds array for the player
oppodds double The returned odds array for the opponents
duration double The time allowed to run the simulation
리턴 void

DetailedOddsWithMultiplePlayers() 공개 정적인 메소드

Cacluates the approxamate odds that each player and opponent mask type has to win. This method uses Monte Carlo Analysis to determine a results. The quality of the result will depend on the number of trials.
public static DetailedOddsWithMultiplePlayers ( ulong pocket, ulong board, ulong dead, int playerCount, double &playerodds, double &oppodds, int trials ) : void
pocket ulong Players Hand
board ulong Current Board
dead ulong Dead Cards
playerCount int the number of players in the mask.
playerodds double The returned odds array for the player
oppodds double The returned odds array for the opponents
trials int The number of simulations to run.
리턴 void

DrawCount() 공개 정적인 메소드

The method returns the number of draws that are possible for the specified HandType.
public static DrawCount ( string player, string board, string dead, Hand type ) : int
player string Two card mask making up the players pocket cards
board string The community cards
dead string Dead cards
type Hand They type of mask to count draws for.
리턴 int

DrawCount() 공개 정적인 메소드

The method returns the number of draws that are possible for the specified HandType. Note that DrawCount(pocket, board, dead, type) is not necessarily the same as DrawCount(pocket | board, dead, type). This method returns all possible draws that are the same as the requested type.
public static DrawCount ( ulong mask, ulong dead, Hand type ) : int
mask ulong Hand
dead ulong Dead cards
type Hand They type of mask to count draws for.
리턴 int

DrawCount() 공개 정적인 메소드

The method returns the number of draws that are possible for the specified HandType. This method only returns the counts that improve the player's mask rather than just the board. Because of this subtle distinction, DrawCount(player, board, dead, type) doesn't necessarily return the same value as DrawCount(player | board, dead, type).
public static DrawCount ( ulong player, ulong board, ulong dead, Hand type ) : int
player ulong Two card mask making up the players pocket cards
board ulong The community cards
dead ulong Dead cards
type Hand They type of mask to count draws for.
리턴 int

Equals() 공개 메소드

Test for equality
public Equals ( object obj ) : bool
obj object
리턴 bool

Evaluate() 공개 정적인 메소드

Evaluates a mask (passed as a string) and returns a mask value. A mask value can be compared against another mask value to determine which has the higher value.
public static Evaluate ( string mask ) : uint
mask string mask string
리턴 uint

Evaluate() 공개 정적인 메소드

Evaluates a mask (passed as a mask mask) and returns a mask value. A mask value can be compared against another mask value to determine which has the higher value.
public static Evaluate ( ulong cards ) : uint
cards ulong mask mask
리턴 uint

Evaluate() 공개 정적인 메소드

Evaluates a mask (passed as a mask mask) and returns a mask value. A mask value can be compared against another mask value to determine which has the higher value.
public static Evaluate ( ulong cards, int nCards ) : uint
cards ulong mask mask
nCards int number of cards in the mask
리턴 uint

EvaluateType() 공개 정적인 메소드

Evaluates the card mask and returns the type of mask it is. This function is faster (but provides less information) than Evaluate or Evaluate.
public static EvaluateType ( ulong mask ) : HandTypes
mask ulong card mask
리턴 HandTypes

EvaluateType() 공개 정적인 메소드

This function is faster (but provides less information) than Evaluate or Evaluate.
public static EvaluateType ( ulong mask, int cards ) : HandTypes
mask ulong card mask
cards int number of cards in mask
리턴 HandTypes

FlushDrawCount() 공개 정적인 메소드

Counts the number of hands that are a flush with one more drawn card.
public static FlushDrawCount ( ulong mask, ulong dead ) : int
mask ulong Hand
dead ulong Cards not allowed to be drawn
리턴 int

FlushDrawCount() 공개 정적인 메소드

Counts the number of hands that are a flush with one more drawn card. However, Flush hands that only improve the board are not considered.
public static FlushDrawCount ( ulong player, ulong board, ulong dead ) : int
player ulong Players two card hand
board ulong Board cards
dead ulong Dead cards
리턴 int

GapCount() 공개 정적인 메소드

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. This method calculates the results. Because of that equivelent call in PocketHands is preferred because it uses a lookup table and is faster. This function remains to allow for automated testing.
public static GapCount ( ulong mask ) : int
mask ulong two card mask mask
리턴 int

GetHashCode() 공개 메소드

Returns hash code
public GetHashCode ( ) : int
리턴 int

Hand() 공개 메소드

Default constructor
public Hand ( ) : System
리턴 System

Hand() 공개 메소드

Constructor
public Hand ( string pocket, string board ) : System
pocket string Pocket Cards
board string Board
리턴 System

HandDistance() 공개 정적인 메소드

This method returns the mask distance from the best possible mask given this board (no draws are considered). The value 0 is the best possible mask. The value 1 is the next best mask and so on.
public static HandDistance ( ulong pocket, ulong board ) : long
pocket ulong The players pocket mask
board ulong The board mask
리턴 long

HandPlayerMultiOpponentOdds() 공개 정적인 메소드

public static HandPlayerMultiOpponentOdds ( ulong ourcards, ulong board, int numOpponents, double duration, double &player, double &opponent ) : void
ourcards ulong
board ulong
numOpponents int
duration double
player double
opponent double
리턴 void

HandPotential() 공개 정적인 메소드

This method is similar to the HandPotential algorithm described in Aaron Davidson's masters thesis, however if differs in several significant ways. First, it makes the calculation while accounting for one or more opponents. Second, it uses the Monte Carlo technique to get answers in a reasonable amount of time (a duration of 0.1 seems to give reasonable results). And finally, the results are not normalized; the positive and negative potential is the actual odds of improvement or worsening of a mask.
public static HandPotential ( string pockethand, string boardhand, double &ppot, double &npot, int NOpponents, double duration ) : void
pockethand string Players pocket card query string
boardhand string The current board string
ppot double The resultant positive potential
npot double The resultant negative potential
NOpponents int The number of opponents
duration double The length of time (in seconds) to spend on this calculation
리턴 void

HandPotential() 공개 정적인 메소드

Returns the normalized, positive and negative potential of the current mask. This funciton is described in Aaron Davidson's masters thesis on page 23.
public static HandPotential ( ulong pocket, ulong board, double &ppot, double &npot ) : void
pocket ulong Hold Cards
board ulong Community cards
ppot double Positive Potential
npot double Negative Potential
리턴 void

HandPotential() 공개 정적인 메소드

This method is similar to the HandPotential algorithm described in Aaron Davidson's masters thesis, however if differs in several significant ways. First, it makes the calculation while accounting for one or more opponents. Second, it uses the Monte Carlo technique to get answers in a reasonable amount of time (a duration of 0.1 seems to give reasonable results). And finally, the results are not normalized; the positive and negative potential is the actual odds of improvement or worsening of a mask.
public static HandPotential ( ulong pocket, ulong board, double &ppot, double &npot, int NOpponents, double duration ) : void
pocket ulong Players pocket card mask
board ulong The current board mask
ppot double The resultant positive potential
npot double The resultant negative potential
NOpponents int The number of opponents
duration double The length of time (in seconds) to spend on this calculation
리턴 void

HandStrength() 공개 정적인 메소드

A HandStrength function that accounts for multiple opponents. This method uses the Monte Carlo menthod to calculate a value. It takes surprisingly little time to get good results. A duration of 0.01 seconds (10mS) returns good results, and a duration of 0.1 (100mS) returns even better results.
public static HandStrength ( string pocketquery, string board, int NOpponnents, double duration ) : double
pocketquery string pocket mask query
board string current board
NOpponnents int the number of opponents (must be 1-9)
duration double time in seconds to perform this calculation
리턴 double

HandStrength() 공개 정적인 메소드

The classic HandStrengh Calculation from page 21 of Aaron Davidson's Masters Thesis.
public static HandStrength ( ulong pocket, ulong board ) : double
pocket ulong Pocket cards
board ulong Current Board
리턴 double

HandStrength() 공개 정적인 메소드

public static HandStrength ( ulong pocket, ulong board, int NOpponnents, double duration ) : double
pocket ulong
board ulong
NOpponnents int
duration double
리턴 double

HandType() 공개 정적인 메소드

public static HandType ( uint handValue ) : uint
handValue uint
리턴 uint

HandWinOdds() 공개 정적인 메소드

public static HandWinOdds ( ulong ourcards, ulong oppcards, ulong board, double &player, double &opponent ) : bool
ourcards ulong
oppcards ulong
board ulong
player double
opponent double
리턴 bool

HandWinOdds() 공개 정적인 메소드

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.
public static HandWinOdds ( 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
리턴 void

HandWinOdds() 공개 정적인 메소드

This method calculates the probablity of a player winning with specific hands and opponents winning with specific hands.
public static HandWinOdds ( string ourcards, string board, double &player, double &opponent, int NOpponents, double duration ) : void
ourcards string pocket cards
board string board cards
player double player win odds
opponent double opponent(s) win odds
NOpponents int The number of opponents
duration double The amount of time in seconds to calculate samples
리턴 void

HandWinOdds() 공개 정적인 메소드

Used to calculate the wining information about each players mask. 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.
public static HandWinOdds ( string pockets, string board, string dead, long wins, long ties, long losses, long &totalHands ) : void
pockets string Array of pocket mask 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.
리턴 void

HandWinOdds() 공개 정적인 메소드

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.
public static HandWinOdds ( ulong ourcards, ulong board, double &player, double &opponent ) : void
ourcards ulong Pocket mask for the mask.
board ulong Board mask for mask
player double Player odds as doubles
opponent double Opponent odds as doubles
리턴 void

HandWinOdds() 공개 정적인 메소드

This method calculates the probablity of a player winning with specific hands and opponents winning with specific hands.
public static HandWinOdds ( ulong ourcards, ulong board, double &player, double &opponent, int NOpponents, double duration ) : void
ourcards ulong pocket card mask
board ulong board cards mask
player double player win odds
opponent double opponent(s) win odds
NOpponents int The number of opponents
duration double The amount of time in seconds to calculate samples
리턴 void

Hands() 공개 정적인 메소드

Enables a foreach command to enumerate all possible ncard hands.
public static Hands ( int numberOfCards ) : IEnumerable
numberOfCards int the number of cards in the mask (must be between 1 and 7)
리턴 IEnumerable

Hands() 공개 정적인 메소드

Enables a foreach command to enumerate all possible ncard hands.
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 mask (must be between 1 and 7)
리턴 IEnumerable

IsBackdoorFlushDraw() 공개 정적인 메소드

Returns true if there are three cards of the same suit. The pocket cards must have at least one card in that suit.
public static IsBackdoorFlushDraw ( string pocket, string board, string dead ) : bool
pocket string Players pocket cards
board string Community cards
dead string Dead cards
리턴 bool

IsBackdoorFlushDraw() 공개 정적인 메소드

Returns true if there are three cards of the same suit. The pocket cards must have at least one card in that suit.
public static IsBackdoorFlushDraw ( ulong pocket, ulong board, ulong dead ) : bool
pocket ulong Players pocket cards mask
board ulong Community card mask
dead ulong Dead cards
리턴 bool

IsConnected() 공개 정적인 메소드

Returns true if the cards in the two card mask are connected. This method calculates the results. Because of that equivelent call in PocketHands is preferred because it uses a lookup table and is faster. This function remains to allow for automated testing.
public static IsConnected ( ulong mask ) : bool
mask ulong the mask to check
리턴 bool

IsFlushDraw() 공개 정적인 메소드

Returns true if there are 4 cards of the same suit.
public static IsFlushDraw ( string pocket, string board, string dead ) : bool
pocket string Players pocket cards
board string Community cards
dead string Dead cards
리턴 bool

IsFlushDraw() 공개 정적인 메소드

Returns true if the hand is a flush draw.
public static IsFlushDraw ( ulong mask, ulong dead ) : bool
mask ulong Cards
dead ulong Dead cards
리턴 bool

IsFlushDraw() 공개 정적인 메소드

Returns true if there are 4 cards of the same suit.
public static IsFlushDraw ( ulong pocket, ulong board, ulong dead ) : bool
pocket ulong Players pocket cards mask
board ulong Community card mask
dead ulong Dead cards
리턴 bool

IsGutShotStraightDraw() 공개 정적인 메소드

Return true if the combined cards contain a gut shot straight.
public static IsGutShotStraightDraw ( string mask, string dead ) : bool
mask string Current mask
dead string Dead cards
리턴 bool

IsGutShotStraightDraw() 공개 정적인 메소드

Return true if the combined cards contain a gut shot straight.
public static IsGutShotStraightDraw ( string pocket, string board, string dead ) : bool
pocket string Players pocket cards
board string Community cards
dead string Dead cards
리턴 bool

IsGutShotStraightDraw() 공개 정적인 메소드

Return true if the combined cards contain a gut shot straight.
public static IsGutShotStraightDraw ( ulong mask, ulong dead ) : bool
mask ulong Current mask
dead ulong Dead cards
리턴 bool

IsGutShotStraightDraw() 공개 정적인 메소드

Return true if the combined cards contain a gut shot straight.
public static IsGutShotStraightDraw ( ulong pocket, ulong board, ulong dead ) : bool
pocket ulong Players pocket cards mask
board ulong Community card mask
dead ulong Dead cards
리턴 bool

IsOpenEndedStraightDraw() 공개 정적인 메소드

Returns true if the mask is an open ended straight draw.
public static IsOpenEndedStraightDraw ( string mask, string dead ) : bool
mask string Players pocket cards mask
dead string Community card mask
리턴 bool

IsOpenEndedStraightDraw() 공개 정적인 메소드

Returns true if the combined mask is an open ended straight draw.
public static IsOpenEndedStraightDraw ( string pocket, string board, string dead ) : bool
pocket string Players pocket cards
board string Community cards
dead string Dead cards
리턴 bool

IsOpenEndedStraightDraw() 공개 정적인 메소드

Returns true if the combined mask is an open ended straight draw.
public static IsOpenEndedStraightDraw ( ulong mask, ulong dead ) : bool
mask ulong Players pocket cards mask
dead ulong Community card mask
리턴 bool

IsOpenEndedStraightDraw() 공개 정적인 메소드

Returns true if the combined mask is an open ended straight draw. Only straight possiblities that improve the player's mask are considered in this method.
public static IsOpenEndedStraightDraw ( ulong pocket, ulong board, ulong dead ) : bool
pocket ulong Players pocket cards mask
board ulong Community card mask
dead ulong Dead cards
리턴 bool

IsStraightDraw() 공개 정적인 메소드

Returns true if the passed mask only needs one card to make a straight. Note that the pocket cards must contains at least one card in the combined straight.
public static IsStraightDraw ( string mask, string dead ) : bool
mask string Current Hand
dead string Dead Cards
리턴 bool

IsStraightDraw() 공개 정적인 메소드

Returns true if the passed mask only needs one card to make a straight.
public static IsStraightDraw ( string pocket, string board, string dead ) : bool
pocket string Players pocket mask
board string Community board
dead string Dead cards
리턴 bool

IsStraightDraw() 공개 정적인 메소드

Returns true if the passed mask only needs one card to make a straight. Note that the pocket cards must contains at least one card in the combined straight.
public static IsStraightDraw ( ulong mask, ulong dead ) : bool
mask ulong Current Hand
dead ulong Dead Cards
리턴 bool

IsStraightDraw() 공개 정적인 메소드

Returns true if the passed mask only needs one card to make a straight. Note that the pocket cards must contains at least one card in the combined straight.
public static IsStraightDraw ( ulong pocket, ulong board, ulong dead ) : bool
pocket ulong Players pocket mask
board ulong Community board
dead ulong Dead cards
리턴 bool

IsSuited() 공개 정적인 메소드

This function returns true if the cards in the mask are all one suit. This method calculates the results. Because of the equivelent call in PocketHands is preferred because it uses a lookup table and is faster. This function remains to allow for automated testing.
public static IsSuited ( ulong mask ) : bool
mask ulong mask to check for "suited-ness"
리턴 bool

Mask() 공개 정적인 메소드

This is a fast way to look up the index mask.
public static Mask ( int index ) : ulong
index int index of mask
리턴 ulong

MaskToString() 공개 정적인 메소드

Turns a card mask into the equivalent human readable string.
public static MaskToString ( ulong mask ) : string
mask ulong mask to convert
리턴 string

OutCards() 공개 정적인 메소드

Returns a string of the possible outs for the next card. Note that cards that only help the board will be ignored.
public static OutCards ( string player, string board ) : string
player string Player pocket card string
board string Board card string
리턴 string

Outs() 공개 정적인 메소드

Returns the number of outs possible with the next card. Note that cards that only help the board will be ignored.
public static Outs ( string player, string board ) : int
player string Players pocket cards
board string The board (must contain either 3 or 4 cards)
리턴 int

Outs() 공개 정적인 메소드

Returns the number of outs possible with the next card.
public static Outs ( ulong player, ulong board ) : int
player ulong Players pocket cards
board ulong The board (must contain either 3 or 4 cards)
리턴 int

OutsDiscounted() 공개 정적인 메소드

Returns the number of discouted outs possible with the next card. Players pocket cards The board (must contain either 3 or 4 cards) A list of zero or more opponent cards. The count of the number of single cards that improve the current hand applying the following discouting rules: 1) Drawing to a pair must use an over card (ie a card higher than all those on the board) 2) Drawing to 2 pair / pairing your hand is discounted if the board is paired (ie your 2 pair drawing deat to trips) 3) Drawing to a hand lower than a flush must not make a 3 suited board or the board be 3 suited. 4) Drawing to a hand lower than a stright, the flop must not be 3card connected or on the turn allow a straight to be made with only 1 pocket card or the out make a straight using only 1 card. Function provided by Matt Baker.
public static OutsDiscounted ( ulong player, ulong board ) : int
player ulong Players pocket hand
board ulong Board cards so far
리턴 int

OutsEx() 공개 정적인 메소드

public static OutsEx ( string pocket, string board, string dead ) : int
pocket string
board string
dead string
리턴 int

OutsEx() 공개 정적인 메소드

public static OutsEx ( ulong pocket, ulong board, ulong dead ) : int
pocket ulong
board ulong
dead ulong
리턴 int

OutsMask() 공개 정적인 메소드

Creates a Hand mask with the cards that will improve the specified players mask 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 mask and will not specifically look at runner-runner possiblities.
public static OutsMask ( ulong player, ulong board ) : ulong
player ulong Players pocket cards
board ulong The board (must contain either 3 or 4 cards)
리턴 ulong

OutsMaskDiscounted() 공개 정적인 메소드

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 hand. This implements the concept of 'discounted outs'. That is outs that will improve the players hand, but not potentially improve an opponents hand to an even better one. For example drawing to a straight that could end up loosing to a flush. Please note that this only looks at single cards that improve the hand and will not specifically look at runner-runner possiblities. Players pocket cards The board (must contain either 3 or 4 cards) A list of zero or more opponent pocket cards A mask of all of the cards that improve the hand applying the following discouting rules: 1) Drawing to a pair must use an over card (ie a card higher than all those on the board) 2) Drawing to 2 pair / pairing your hand is discounted if the board is paired (ie your 2 pair drawing deat to trips) 3) Drawing to a hand lower than a flush must not make a 3 suited board or the board be 3 suited. 4) Drawing to a hand lower than a stright, the flop must not be 3card connected or on the turn allow a straight to be made with only 1 pocket card or the out make a straight using only 1 card. Function provided by Matt Baker.
public static OutsMaskDiscounted ( ulong player, ulong board ) : ulong
player ulong Players pocket hand
board ulong Board mask
리턴 ulong

OutsMaskEx() 공개 정적인 메소드

public static OutsMaskEx ( string pocket, string board, string dead ) : ulong
pocket string
board string
dead string
리턴 ulong

OutsMaskEx() 공개 정적인 메소드

Creates a Hand mask with the cards that will improve the specified players mask. Please note that this only looks at single cards that improve the mask and will not specifically look at runner-runner possiblities. This version of outs contributed by Matt Baker
public static OutsMaskEx ( ulong player, ulong board, ulong dead ) : ulong
player ulong Players pocket cards
board ulong The board (must contain either 3 or 4 cards)
dead ulong Dead cards
리턴 ulong

ParseCard() 공개 정적인 메소드

Reads an string definition of a card and returns the Card value.
public static ParseCard ( string card ) : int
card string card string
리턴 int

ParseHand() 공개 정적인 메소드

Parses an string description of a mask and returns a mask mask.
public static ParseHand ( string mask ) : ulong
mask string string descripton of a mask
리턴 ulong

ParseHand() 공개 정적인 메소드

Parse Hand.
public static ParseHand ( string hand, int &cards ) : ulong
hand string Hand string
cards int Cards found
리턴 ulong

ParseHand() 공개 정적인 메소드

This static method parses the passed pocket cards and board and produces a card mask.
public static ParseHand ( string pocket, string board, int &cards ) : ulong
pocket string ASCII string representing pocket cards
board string ASCII string representing board
cards int Number of cards represented in mask
리턴 ulong

PocketHand169Type() 공개 정적인 메소드

Given a pocket pair mask, the PocketHand169Enum cooresponding to this mask will be returned.
public static PocketHand169Type ( ulong mask ) : PocketHand169Enum
mask ulong
리턴 PocketHand169Enum

RandomHand() 공개 정적인 메소드

This method will return a random mask with the number of cards specified.
public static RandomHand ( Random rand, int ncards ) : ulong
rand Random Random number generator.
ncards int The number of cards to return
리턴 ulong

RandomHand() 공개 정적인 메소드

This method will randomly chose a pocket mask from the query string that doesn't contain any of the specified dead cards. That pocket mask will be used as a set of shared cards that must be used in the final generated mask. The mask will contain the number of cards specified in the ncards argument.
public static RandomHand ( Random rand, string query, ulong dead, int ncards ) : ulong
rand Random Random number generator.
query string A pocket mask query string
dead ulong A set of cards that may not be used in the generated mask as a mask mask
ncards int The number of cards that must be in the final mask.
리턴 ulong

RandomHand() 공개 정적인 메소드

Returns a randomly generated mask that doesn't include any of the cards in the dead card mask. The mask will return the number of card in the ncards argument.
public static RandomHand ( Random rand, ulong dead, int ncards ) : ulong
rand Random Random number generator.
dead ulong The mask of cards that may not be used in the generated mask
ncards int The number of cards to return in the generated mask
리턴 ulong

RandomHand() 공개 정적인 메소드

This method randomly picks from a list of possible masks.
public static RandomHand ( Random rand, ulong list, ulong dead, int ncards ) : ulong
rand Random Random number generator.
list ulong The list of masks to pick from.
dead ulong A mask containing cards that must not be chosen
ncards int The number of cards to return
리턴 ulong

RandomHand() 공개 정적인 메소드

public static RandomHand ( ulong dead, int ncards ) : ulong
dead ulong
ncards int
리턴 ulong

RandomHand() 공개 정적인 메소드

This method randomly picks from a list of possible masks.
public static RandomHand ( ulong list, ulong dead, int ncards ) : ulong
list ulong The list of masks to pick from.
dead ulong A mask containing cards that must not be chosen
ncards int The number of cards to return
리턴 ulong

RandomHands() 공개 정적인 메소드

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 mask evaluator you should remove this function along with the other interop functions in this file.
public static RandomHands ( int ncards, double duration ) : IEnumerable
ncards int The number of cards in the returned mask.
duration double The amount of time to allow the generation of hands to occur. When elapsed, the iterator will terminate.
리턴 IEnumerable

RandomHands() 공개 정적인 메소드

Iterates through random hands with ncards number of cards. This iterator will return the number of masks specifed in trials. Masks can be repeated.
public static RandomHands ( int ncards, int trials ) : IEnumerable
ncards int Number of cards required to be in the mask.
trials int Number of total mask to return.
리턴 IEnumerable

RandomHands() 공개 정적인 메소드

Interate through the hands defined in the pocket mask definition.
public static RandomHands ( string query, ulong dead, int ncards, double duration ) : IEnumerable
query string Pocket card string
dead ulong Cards not allowed.
ncards int The number of cards the returned mask
duration double The time allowed for iterating
리턴 IEnumerable

RandomHands() 공개 정적인 메소드

Returns random hands out of the list of mask provided.
public static RandomHands ( ulong list, ulong dead, int ncards, double duration ) : IEnumerable
list ulong List of possible hands
dead ulong Cards not allowed
ncards int Total number of cards in returned mask
duration double The time allowed for iterating
리턴 IEnumerable

RandomHands() 공개 정적인 메소드

This function iterates through random hands returning the number of random hands specified in trials. Please note that a mask can be repeated.
public static RandomHands ( ulong shared, ulong dead, int ncards, int trials ) : IEnumerable
shared ulong Cards that must be in the mask.
dead ulong Cards that must not be in the mask.
ncards int The total number of cards in the mask.
trials int The total number of random hands to return.
리턴 IEnumerable

StraightDrawCount() 공개 정적인 메소드

The method returns the number of straight draws that are possible for the current mask.
public static StraightDrawCount ( ulong mask, ulong dead ) : int
mask ulong Current Hand
dead ulong Dead cards
리턴 int

StraightDrawCount() 공개 정적인 메소드

The method returns the number of straight draws that are possible for the player and board configuration. This method filters the results so only player hand improvements are counted.
public static StraightDrawCount ( ulong player, ulong board, ulong dead ) : int
player ulong Two card mask making up the players pocket cards
board ulong The community cards
dead ulong Dead cards
리턴 int

ToString() 공개 메소드

Returns the string representing the mask.
public ToString ( ) : string
리턴 string

TopCard() 공개 정적인 메소드

public static TopCard ( System hv ) : uint
hv System
리턴 uint

UniqueHands() 공개 정적인 메소드

This method returns the number of unique mask values that can be made with ncards, where all of the hands contain the shared cards.
public static UniqueHands ( ulong shared, int ncards ) : long
shared ulong Cards required in all of the hands
ncards int The number of cards in the mask
리턴 long

ValidateHand() 공개 정적인 메소드

This function takes a string representing a full or partial holdem mask and validates that the text represents valid cards and that no card is duplicated.
public static ValidateHand ( string hand ) : bool
hand string mask to validate
리턴 bool

ValidateHand() 공개 정적인 메소드

This function takes a string representing pocket cards and a board and then validates that the text represents a valid mask.
public static ValidateHand ( string pocket, string board ) : bool
pocket string Pocket cards as a string
board string Board cards as a string
리턴 bool

WinOdds() 공개 정적인 메소드

This method returns the approximate odd for the players mask winning against multiple opponents. This uses a default time duration of 0.25S (or 250mS) for the time allotment for Monte Carlo analysis.
public static WinOdds ( string pocket, string board, int numOpponents ) : double
pocket string The pocket mask of the player.
board string The current board cards
numOpponents int The number of oppoents 1-9 are legal values
리턴 double

WinOdds() 공개 정적인 메소드

This method returns the approximate odd for the players mask winning against multiple opponents.
public static WinOdds ( string pocketquery, string boardhand, string deadcards, int numOpponents, double duration ) : double
pocketquery string The pocket mask of the player.
boardhand string The current board cards
deadcards string dead cards
numOpponents int The approximate odds of winning the passed mask against the number of opponents specified.
duration double The period of time (in seconds) to run trials. On my 2.8Ghz laptop 0.1 seconds seems adequate.
리턴 double

WinOdds() 공개 정적인 메소드

This method returns the approximate odd for the players mask winning against multiple opponents. This uses a default time duration of 0.25S (or 250mS) for the time allotment for Monte Carlo analysis.
public static WinOdds ( string pocket, string board, ulong dead, int numOpponents ) : double
pocket string The pocket mask of the player.
board string The current board cards
dead ulong Dead cards
numOpponents int The number of oppoents 1-9 are legal values
리턴 double

WinOdds() 공개 정적인 메소드

This method returns the exact odds of the specified mask mask winning against an average player. It's reasonably fast because it uses a lookup table when possible.
public static WinOdds ( ulong pocket, ulong board, ulong dead ) : double
pocket ulong The pocket mask
board ulong The board mask
dead ulong Dead cards
리턴 double

WinOdds() 공개 정적인 메소드

This method returns the approximate odd for the players mask winning against multiple opponents. This uses a default time duration of 0.1S (or 100mS) for the time allotment for Monte Carlo analysis.
public static WinOdds ( ulong pocket, ulong board, ulong dead, int numOpponents ) : double
pocket ulong The pocket mask of the player.
board ulong The current board cards
dead ulong Dead cards
numOpponents int The number of oppoents 1-9 are legal values
리턴 double

WinOdds() 공개 정적인 메소드

This method returns the approximate odd for the players mask winning against multiple opponents.
public static WinOdds ( ulong pocket, ulong board, ulong dead, int numOpponents, double duration ) : double
pocket ulong The pocket mask of the player.
board ulong The current board cards
dead ulong Dead cards
numOpponents int The approximate odds of winning the passed mask against the number of opponents specified.
duration double The period of time (in seconds) to run trials. On my 2.8Ghz laptop 0.1 seconds seems adequate.
리턴 double

operator() 공개 정적인 메소드

Test for inequality.
public static operator ( ) : bool
리턴 bool

프로퍼티 상세

CLUB_OFFSET 공개적으로 정적으로 프로퍼티

public static int CLUB_OFFSET
리턴 int

CardJoker 공개적으로 정적으로 프로퍼티

public static int CardJoker
리턴 int

CardMasksTable 공개적으로 정적으로 프로퍼티

This table is equivalent to 1UL left shifted by the index. The lookup is faster than the left shift operator.
public static ulong[] CardMasksTable
리턴 ulong[]

CardTable 공개적으로 정적으로 프로퍼티

public static string[] CardTable
리턴 string[]

Clubs 공개적으로 정적으로 프로퍼티

Represents the suit - Clubs
public static int Clubs
리턴 int

DIAMOND_OFFSET 공개적으로 정적으로 프로퍼티

public static int DIAMOND_OFFSET
리턴 int

Diamonds 공개적으로 정적으로 프로퍼티

Represents the suit - Diamonds
public static int Diamonds
리턴 int

HEART_OFFSET 공개적으로 정적으로 프로퍼티

public static int HEART_OFFSET
리턴 int

Hearts 공개적으로 정적으로 프로퍼티

Represents the suit - Hearts
public static int Hearts
리턴 int

NCardsWJoker 공개적으로 정적으로 프로퍼티

public static int NCardsWJoker
리턴 int

NumberOfCards 공개적으로 정적으로 프로퍼티

The total number of cards in a deck
public static int NumberOfCards
리턴 int

Rank2 공개적으로 정적으로 프로퍼티

Rank of a card with a value of two.
public static int Rank2
리턴 int

Rank3 공개적으로 정적으로 프로퍼티

Rank of a card with a value of three.
public static int Rank3
리턴 int

Rank4 공개적으로 정적으로 프로퍼티

Rank of a card with a value of four.
public static int Rank4
리턴 int

Rank5 공개적으로 정적으로 프로퍼티

Rank of a card with a value of five.
public static int Rank5
리턴 int

Rank6 공개적으로 정적으로 프로퍼티

Rank of a card with a value of six.
public static int Rank6
리턴 int

Rank7 공개적으로 정적으로 프로퍼티

Rank of a card with a value of seven.
public static int Rank7
리턴 int

Rank8 공개적으로 정적으로 프로퍼티

Rank of a card with a value of eight.
public static int Rank8
리턴 int

Rank9 공개적으로 정적으로 프로퍼티

Rank of a card with a value of nine.
public static int Rank9
리턴 int

RankAce 공개적으로 정적으로 프로퍼티

Rank of a card showing an Ace.
public static int RankAce
리턴 int

RankJack 공개적으로 정적으로 프로퍼티

Rank of a card showing a Jack.
public static int RankJack
리턴 int

RankKing 공개적으로 정적으로 프로퍼티

Rank of a card showing a King.
public static int RankKing
리턴 int

RankQueen 공개적으로 정적으로 프로퍼티

Rank of a card showing a Queen.
public static int RankQueen
리턴 int

RankTen 공개적으로 정적으로 프로퍼티

Rank of a card with a value of ten.
public static int RankTen
리턴 int

SPADE_OFFSET 공개적으로 정적으로 프로퍼티

public static int SPADE_OFFSET
리턴 int

Spades 공개적으로 정적으로 프로퍼티

Represents the suit - Spades
public static int Spades
리턴 int

TwoCardMaskTable 공개적으로 정적으로 프로퍼티

1326 ulong cards masks for all hold cards.
public static ulong[] TwoCardMaskTable
리턴 ulong[]

TwoCardMaskTableSize 공개적으로 정적으로 프로퍼티

public static int TwoCardMaskTableSize
리턴 int

nBitsAndStrTable 공개적으로 정적으로 프로퍼티

public static UInt16[] nBitsAndStrTable
리턴 UInt16[]