com.biotools.meerkat
Interface GameInfo


public interface GameInfo

All of the public game information for the current hand of poker is available through the GameInfo object.


Method Summary
 boolean canRaise(int seat)
          See if the player in the given seat is able to raise
 double getAmountToCall(int seat)
          Get a player's amount to call
 double getAnte()
          Get the amount of the ante, if any
 double getBankRoll(int seat)
          Get a player's bankroll
 double getBankRollAtRisk(int seat)
          Get the maximum amount the player in the given seat can risk in this hand.
 double getBetsToCall(int seat)
          Get a player's amount to call in bets
 int getBigBlindSeat()
          Get the big blind seat
 double getBigBlindSize()
          Get the amount of the big blind
 Hand getBoard()
          Get the board cards
 int getButtonSeat()
          Get the seat the button is on (could be dead button)
 double getCurrentBetSize()
          Get the amount of the betting increment (for fixed-limit)
 int getCurrentPlayerSeat()
          Get the seat for the current player to act
 double getEligiblePot(int seat)
          Get the amount in the pot that a player is eligble to win.
 long getGameID()
          The unique game identifier for this hand
 java.lang.String getLogDirectory()
          Get the Log Directory used by all players for keeping logs
 double getMainPotSize()
          Get the size of the main pot.
 double getMinRaise()
          Get the smallest legal raise
 int getNumActivePlayers()
          Get the number of players still active (not folded) in the hand
 int getNumActivePlayersNotAllIn()
          The number of active players that are not all-in
 int getNumberOfAllInPlayers()
          Get the number of players in the hand that are all-in
 int getNumPlayers()
          Get the number of players dealt into the hand
 int getNumRaises()
          The number of bets and raises made during the current betting round
 int getNumSeats()
          The number of seats at the table
 int getNumSidePots()
          Get the number of side pots
 int getNumToAct()
          The number of players still to act in this betting round if there are no further raises.
 int getNumWinners()
          The number of players that were awarded a pot in this hand
 PlayerInfo getPlayer(int seat)
          Get state information for a player in a given seat
 PlayerInfo getPlayer(java.lang.String name)
          Get state information for a player in a given seat
 java.lang.String getPlayerName(int seat)
          Get the name of the player in a given seat
 int getPlayerSeat(java.lang.String name)
          Get the seat number for a player by name
 java.util.List getPlayersInPot(double amountIn)
          Get a list of all players eligible to win a pot with the given minimum stakes
 double getRake()
          Get the amount raked from pot so far
 double getSidePotSize(int i)
          Get the size of the side pot amount.
 int getSmallBlindSeat()
          Get the small blind seat (could be dead small blind)
 double getSmallBlindSize()
          Get the amount of the small blind
 int getStage()
          Get the current game stage (Holdem.PREFLOP, Holdem.FLOP, Holdem.TURN, Holdem.RIVER)
 double getStakes()
          The stakes are the amount each player must have invested in the pot to stay active in the hand.
 double getTotalPotSize()
          Get the total size of the pot including the main pot and all side pots.
 int getUnacted()
          Get the number of players who have not acted yet this round
 boolean inGame(int seat)
          See if the player in the given seat is dealt into the hand (not sitting out or empty).
 boolean isActive(int seat)
          See if the player in the given seat is still active in the hand
 boolean isCommitted(int seat)
          See if a player has invested anything in the current round
 boolean isFixedLimit()
          Determine if the game is fixed-limit
 boolean isFlop()
          See if it is currently the flop round
 boolean isGameOver()
          See if the hand is over
 boolean isNoLimit()
          Determine if the game is no-limit
 boolean isPostFlop()
          See if it is currently the post-flop
 boolean isPotLimit()
          Determine if the game is pot-limit
 boolean isPreFlop()
          See if it is currently the pre-flop
 boolean isReverseBlinds()
          In reverse blinds mode, if the game is Heads-up, the small blind is placed on the button.
 boolean isRiver()
          See if it is currently the river round
 boolean isSimulation()
          Determine if the game is in simulation mode.
 boolean isTurn()
          See if it is currently the turn round
 boolean isZipMode()
          We should play as fast and crudely as possible because the user has requested we zip to the end of the hand.
 int nextActivePlayer(int seat)
          Get the seat number of the next active player at the table (skips empty seats and folded players)
 int nextPlayer(int seat)
          Get the seat number of the next player at the table (skips empty seats)
 int nextSeat(int seat)
          Get the next seat number clockwise from the given seat
 int previousPlayer(int seat)
          Get the seat number of the previous player at the table (skips empty seats)
 

Method Detail

getLogDirectory

java.lang.String getLogDirectory()
Get the Log Directory used by all players for keeping logs


getGameID

long getGameID()
The unique game identifier for this hand

Returns:
a unique game identifier for this hand

getStage

int getStage()
Get the current game stage (Holdem.PREFLOP, Holdem.FLOP, Holdem.TURN, Holdem.RIVER)

Returns:
the current game stage

isPreFlop

boolean isPreFlop()
See if it is currently the pre-flop

Returns:
true if were on the pre-flop round

isPostFlop

boolean isPostFlop()
See if it is currently the post-flop

Returns:
true if were on the post-flop

isFlop

boolean isFlop()
See if it is currently the flop round

Returns:
true if were on the flop round

isTurn

boolean isTurn()
See if it is currently the turn round

Returns:
true if were on the turn round

isRiver

boolean isRiver()
See if it is currently the river round

Returns:
true if were on the river round

getAnte

double getAnte()
Get the amount of the ante, if any

Returns:
the amount of the ante, if any

getSmallBlindSize

double getSmallBlindSize()
Get the amount of the small blind

Returns:
the amount of the small blind

getBigBlindSize

double getBigBlindSize()
Get the amount of the big blind

Returns:
the amount of the big blind

getCurrentBetSize

double getCurrentBetSize()
Get the amount of the betting increment (for fixed-limit)

Returns:
Get the amount of the betting increment

nextSeat

int nextSeat(int seat)
Get the next seat number clockwise from the given seat

Parameters:
seat - a seat number
Returns:
the next seat number

nextPlayer

int nextPlayer(int seat)
Get the seat number of the next player at the table (skips empty seats)

Parameters:
seat - a seat number
Returns:
the seat number of the next player at the table

previousPlayer

int previousPlayer(int seat)
Get the seat number of the previous player at the table (skips empty seats)

Parameters:
seat - a seat number
Returns:
the seat number of the previous player at the table

nextActivePlayer

int nextActivePlayer(int seat)
Get the seat number of the next active player at the table (skips empty seats and folded players)

Parameters:
seat - a seat number
Returns:
the seat number of the next active player at the table

getBoard

Hand getBoard()
Get the board cards

Returns:
the board cards

getTotalPotSize

double getTotalPotSize()
Get the total size of the pot including the main pot and all side pots.


getMainPotSize

double getMainPotSize()
Get the size of the main pot.

Returns:
the size of the main pot.

getNumSidePots

int getNumSidePots()
Get the number of side pots

Returns:
the number of side pots

getSidePotSize

double getSidePotSize(int i)
Get the size of the side pot amount.

Parameters:
i - the side pot index [0..n-1]
Returns:
the size of the ith side pot.

getButtonSeat

int getButtonSeat()
Get the seat the button is on (could be dead button)

Returns:
the seat the button is on

getSmallBlindSeat

int getSmallBlindSeat()
Get the small blind seat (could be dead small blind)

Returns:
the small blind seat

getBigBlindSeat

int getBigBlindSeat()
Get the big blind seat

Returns:
the big blind seat

getCurrentPlayerSeat

int getCurrentPlayerSeat()
Get the seat for the current player to act

Returns:
the seat for the current player

getEligiblePot

double getEligiblePot(int seat)
Get the amount in the pot that a player is eligble to win. A player is not eligible to win any money in a side-pot that would be created if they are or went all-in. They may only win the pots in which they are invested.

Parameters:
seat - the player in question
Returns:
the amount in the pot matching the amountIn

getNumPlayers

int getNumPlayers()
Get the number of players dealt into the hand

Returns:
the number of players dealt into the hand

getNumActivePlayers

int getNumActivePlayers()
Get the number of players still active (not folded) in the hand

Returns:
the number of active players

getNumberOfAllInPlayers

int getNumberOfAllInPlayers()
Get the number of players in the hand that are all-in

Returns:
the number of players in the hand that are all-in

getNumActivePlayersNotAllIn

int getNumActivePlayersNotAllIn()
The number of active players that are not all-in

Returns:
the number of active players that are not all-in

getNumToAct

int getNumToAct()
The number of players still to act in this betting round if there are no further raises.

Returns:
the number of players still to act in this betting round

getUnacted

int getUnacted()
Get the number of players who have not acted yet this round

Returns:
the number of players who have not acted yet this round

getNumSeats

int getNumSeats()
The number of seats at the table

Returns:
the number of seats at the table

getStakes

double getStakes()
The stakes are the amount each player must have invested in the pot to stay active in the hand.

Returns:
the amount a player must have invested to stay active

getPlayersInPot

java.util.List getPlayersInPot(double amountIn)
Get a list of all players eligible to win a pot with the given minimum stakes

Parameters:
amountIn - the amount a player must have in the pot to be eligible to win it
Returns:
a list of all players eligible to win the pot

getPlayer

PlayerInfo getPlayer(int seat)
Get state information for a player in a given seat

Parameters:
seat - the seat the check
Returns:
information for a player in the given seat or null if seat is empty

getPlayer

PlayerInfo getPlayer(java.lang.String name)
Get state information for a player in a given seat

Parameters:
name - the player to check
Returns:
information for a player or null if not found

getBetsToCall

double getBetsToCall(int seat)
Get a player's amount to call in bets

Parameters:
seat - the seat number to check
Returns:
the player's amount to call in bets

getAmountToCall

double getAmountToCall(int seat)
Get a player's amount to call

Parameters:
seat - the seat number to check
Returns:
the player's amount to call

getBankRoll

double getBankRoll(int seat)
Get a player's bankroll

Parameters:
seat - the seat number to check
Returns:
the player's bankroll at this seat

getBankRollAtRisk

double getBankRollAtRisk(int seat)
Get the maximum amount the player in the given seat can risk in this hand. For instance, a the player can only lose up to the amount of the largest active stack they have covered, or all their chips if an active stack has them covered.

Parameters:
seat - the seat number to check
Returns:
the maximum amount the player in the given seat can risk in this hand

getPlayerName

java.lang.String getPlayerName(int seat)
Get the name of the player in a given seat

Parameters:
seat - the seat to check
Returns:
the name of the player in the given seat

getPlayerSeat

int getPlayerSeat(java.lang.String name)
Get the seat number for a player by name

Parameters:
name - the name of a player
Returns:
the seat the player is in or -1 if not found

canRaise

boolean canRaise(int seat)
See if the player in the given seat is able to raise

Parameters:
seat - a player's seat number
Returns:
true if the player in the given seat is able to raise

inGame

boolean inGame(int seat)
See if the player in the given seat is dealt into the hand (not sitting out or empty).

Parameters:
seat - a player's seat number
Returns:
true if the player in the given seat was dealt into the hand

isActive

boolean isActive(int seat)
See if the player in the given seat is still active in the hand

Parameters:
seat - a player's seat number
Returns:
true if the player in the given seat is still active in the hand

isCommitted

boolean isCommitted(int seat)
See if a player has invested anything in the current round

Parameters:
seat - the seat number to check
Returns:
true if the player in the given seat has invested money this round

getNumWinners

int getNumWinners()
The number of players that were awarded a pot in this hand

Returns:
the number of players that were awarded a pot in this hand

isGameOver

boolean isGameOver()
See if the hand is over

Returns:
true if the hand is over

isNoLimit

boolean isNoLimit()
Determine if the game is no-limit

Returns:
true if the game is no-limit

isFixedLimit

boolean isFixedLimit()
Determine if the game is fixed-limit

Returns:
true if the game is fixed-limit

isPotLimit

boolean isPotLimit()
Determine if the game is pot-limit

Returns:
true if the game is pot-limit

getNumRaises

int getNumRaises()
The number of bets and raises made during the current betting round

Returns:
the number of bets and raises made during the current round

getMinRaise

double getMinRaise()
Get the smallest legal raise

Returns:
the smallest legal raise

getRake

double getRake()
Get the amount raked from pot so far

Returns:
the current amount raked from the pot

isSimulation

boolean isSimulation()
Determine if the game is in simulation mode. Simulations are high speed games used to determine approximate values of particular hand scenarios In simulation mode, players may choose to play faster, using cruder approximations, and should avoid all use of disk.

Returns:
true if the game is in simulation mode.

isZipMode

boolean isZipMode()
We should play as fast and crudely as possible because the user has requested we zip to the end of the hand.

Returns:
true if we are in zip mode

isReverseBlinds

boolean isReverseBlinds()
In reverse blinds mode, if the game is Heads-up, the small blind is placed on the button.

Returns:
if we are using reverse blinds rules for heads-up