C# Class holdem_engine.HandEngine

Plays of a hand of poker between a list of players. Designed for fast local use by AI agents. Author: Wesley Tansey
Mostrar archivo Open project: tansey/holdem_engine Class Usage Examples

Public Methods

Method Description
DealFlop ( ) : void
DealHoleCards ( ) : void

Deals out all of the players' hole cards.

DealRiver ( ) : void
DealTurn ( ) : void
GetBets ( List curRoundActions ) : void

Gets the bets from all the players still in the hand.

GetBlinds ( ) : void

Forces players to post blinds before the hand can start.

HandEngine ( ) : System
PlayHand ( HandHistory handHistory ) : void

Plays a hand from the start. Note that this method will not resume a game from a saved hand _history.

PlayHand ( HandHistory handHistory, CachedHand cachedHand ) : void

Plays a hand from the start. Note that this method will not resume a game from a saved hand _history.

Private Methods

Method Description
AddAction ( int pIdx, System.Action action, List curRoundActions ) : void
GetFirstToAct ( bool preflop ) : int
payWinners ( ) : void

Method Details

DealFlop() public method

public DealFlop ( ) : void
return void

DealHoleCards() public method

Deals out all of the players' hole cards.
public DealHoleCards ( ) : void
return void

DealRiver() public method

public DealRiver ( ) : void
return void

DealTurn() public method

public DealTurn ( ) : void
return void

GetBets() public method

Gets the bets from all the players still in the hand.
public GetBets ( List curRoundActions ) : void
curRoundActions List
return void

GetBlinds() public method

Forces players to post blinds before the hand can start.
public GetBlinds ( ) : void
return void

HandEngine() public method

public HandEngine ( ) : System
return System

PlayHand() public method

Plays a hand from the start. Note that this method will not resume a game from a saved hand _history.
public PlayHand ( HandHistory handHistory ) : void
handHistory HandHistory An new hand _history with the list of players and the game parameters.
return void

PlayHand() public method

Plays a hand from the start. Note that this method will not resume a game from a saved hand _history.
public PlayHand ( HandHistory handHistory, CachedHand cachedHand ) : void
handHistory HandHistory An new hand _history with the list of players and the game parameters.
cachedHand CachedHand The cached deck to use.
return void