C# Класс holdem_engine.BetManager

The job of the BetManager is to validate all bets returned by the PlayerManager. The BetManager also determines if the current betting round is over. Author: Wesley Tansey
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
BetManager ( double>.Dictionary namesToChips, BettingStructure structure, double blinds, double ante ) : System

Creates a new BetManager for the hand.

Commit ( System.Action action ) : void

Updates the information about the current betting scenario.

GetValidatedAction ( System.Action action ) : System.Action

Checks the given Action object to make sure it's valid. Invalid actions will be changed to the closest corresponding action. The convention used to change invalid actions is as follows: - Actions of type None, JoinTable, SitOut, LeaveTable will automatically become Fold Actions. - Invalid Post* actions will be treated as Checks (see below). - Invalid Checks will be turned into Folds. - Bets which are sent after another player has bet this round will be turned into raises and have to adhear to the same convention (see below). - Raises which are less than MinimumRaise will be changed to be of Amount = MinimumRaise. - Raises which are more than the size of a player's remaining chips will be changed into AllIns and adhear to the same convention (see below). - AllIns will have their Amount changed to the size of a player's remaining stack.

Приватные методы

Метод Описание
validateAllIn ( System.Action action ) : System.Action
validateBet ( System.Action action ) : System.Action
validateCall ( System.Action action ) : System.Action
validateCheck ( System.Action action ) : System.Action
validateFold ( System.Action action ) : System.Action
validatePostAnte ( System.Action action ) : System.Action
validatePostBigBlind ( System.Action action ) : System.Action
validatePostSmallBlind ( System.Action action ) : System.Action
validateRaise ( System.Action action ) : System.Action

Описание методов

BetManager() публичный Метод

Creates a new BetManager for the hand.
public BetManager ( double>.Dictionary namesToChips, BettingStructure structure, double blinds, double ante ) : System
namesToChips double>.Dictionary A dictionary that maps player names to the amount of money they started the hand with.
structure BettingStructure The type of betting structure this hand is.
blinds double
ante double The ante for this hand. If there is no ante, it should be set to -1.
Результат System

Commit() публичный Метод

Updates the information about the current betting scenario.
public Commit ( System.Action action ) : void
action System.Action The validated action the player is taking
Результат void

GetValidatedAction() публичный Метод

Checks the given Action object to make sure it's valid. Invalid actions will be changed to the closest corresponding action. The convention used to change invalid actions is as follows: - Actions of type None, JoinTable, SitOut, LeaveTable will automatically become Fold Actions. - Invalid Post* actions will be treated as Checks (see below). - Invalid Checks will be turned into Folds. - Bets which are sent after another player has bet this round will be turned into raises and have to adhear to the same convention (see below). - Raises which are less than MinimumRaise will be changed to be of Amount = MinimumRaise. - Raises which are more than the size of a player's remaining chips will be changed into AllIns and adhear to the same convention (see below). - AllIns will have their Amount changed to the size of a player's remaining stack.
public GetValidatedAction ( System.Action action ) : System.Action
action System.Action The Action which needs to be validated.
Результат System.Action