Simple Poker Template 0.0.1
Loading...
Searching...
No Matches
SimplePoker.Logic.PokerPotBet Class Reference

Manages the poker pot and bets, including tracking total pot amount, sub-pots for each turn, adding bets, and determining winnings. More...

Public Member Functions

 PokerPotBet ()
 
int GetTotalPot ()
 Gets the total chips in the pot.
 
int GetHighBetByTurn (GameManager.TurnPoker turnPoker)
 Gets the highest bet amount in the specified turn of the game.
 
int GetPlayerBetByTurn (PlayerBase player, GameManager.TurnPoker turnPoker)
 Gets the bet amount of a player in the specified turn of the turn poker.
 
int GetTurnIndex (GameManager.TurnPoker turnPoker)
 Gets the index of the specified turn in the turn poker.
 
void AddBet (GameManager.TurnPoker turnPoker, PlayerBase player, int chips)
 Adds a bet to the specified turn of the game for the specified player.
 
int WinnerPotChips (PlayerBase player)
 Determines the chips a player has won from the pot and updates the pot accordingly.
 
void ReturnRemainingChipsToPlayers ()
 Returns any remaining chips in the pot to the respective players.
 

Properties

int TotalPot [get]
 
List< PotSubPotList [get]
 

Detailed Description

Manages the poker pot and bets, including tracking total pot amount, sub-pots for each turn, adding bets, and determining winnings.

Constructor & Destructor Documentation

◆ PokerPotBet()

SimplePoker.Logic.PokerPotBet.PokerPotBet ( )

Member Function Documentation

◆ AddBet()

void SimplePoker.Logic.PokerPotBet.AddBet ( GameManager::TurnPoker turnPoker,
PlayerBase player,
int chips )

Adds a bet to the specified turn of the game for the specified player.

Parameters
turnPokerThe turn of the game.
playerThe player placing the bet.
chipsThe number of chips to bet.

◆ GetHighBetByTurn()

int SimplePoker.Logic.PokerPotBet.GetHighBetByTurn ( GameManager::TurnPoker turnPoker)

Gets the highest bet amount in the specified turn of the game.

Parameters
turnPokerThe turn of the game.
Returns
The highest bet amount.

◆ GetPlayerBetByTurn()

int SimplePoker.Logic.PokerPotBet.GetPlayerBetByTurn ( PlayerBase player,
GameManager::TurnPoker turnPoker )

Gets the bet amount of a player in the specified turn of the turn poker.

Parameters
playerThe player to retrieve the bet amount for.
turnPokerThe turn of the game.
Returns
The bet amount of the player in the specified turn.

◆ GetTotalPot()

int SimplePoker.Logic.PokerPotBet.GetTotalPot ( )

Gets the total chips in the pot.

Returns
The total chips in the pot.

◆ GetTurnIndex()

int SimplePoker.Logic.PokerPotBet.GetTurnIndex ( GameManager::TurnPoker turnPoker)

Gets the index of the specified turn in the turn poker.

Parameters
turnPokerThe turn of the game.
Returns
The index of the specified turn.

◆ ReturnRemainingChipsToPlayers()

void SimplePoker.Logic.PokerPotBet.ReturnRemainingChipsToPlayers ( )

Returns any remaining chips in the pot to the respective players.

◆ WinnerPotChips()

int SimplePoker.Logic.PokerPotBet.WinnerPotChips ( PlayerBase player)

Determines the chips a player has won from the pot and updates the pot accordingly.

Parameters
playerThe player to calculate winnings for.
Returns
The total chips won by the player.

Property Documentation

◆ SubPotList

List<Pot> SimplePoker.Logic.PokerPotBet.SubPotList
get

◆ TotalPot

int SimplePoker.Logic.PokerPotBet.TotalPot
get

The documentation for this class was generated from the following file: