|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.ualberta.cs.poker.free.academy25.GameInfoImpl
public class GameInfoImpl
Field Summary | |
---|---|
PlayerInfoDynamics[] |
players
|
Constructor Summary | |
---|---|
GameInfoImpl(GameInfoDynamics dynamics)
|
Method Summary | |
---|---|
boolean |
canRaise(int seat)
You can raise if there are less than 4 bets on this round and the number of active players is 2 (everybody). |
static Hand |
convertToHand(Card[] cards)
Convert old cards to new cards. |
double |
getAmountToCall(int seat)
The amount to call is the different between the stake and the pot of seat: however, if someone has folded (is inactive), it is zero. |
double |
getAnte()
There are no antes in the variant we are playing, so this returns zero. |
double |
getBankRoll(int seat)
Returns the current bankroll of a player. |
double |
getBankRollAtRisk(int seat)
This function is primarily for no-limit games, and therefore there is no formal specification here and its use is not recommended. |
double |
getBetsToCall(int seat)
The amount to call, except in terms of the current bet size. |
int |
getBigBlindSeat()
The seat that has or will submit the big blind. |
double |
getBigBlindSize()
The size of the big blind, equal to the size of the small bet. |
Hand |
getBoard()
Returns the visible board. |
int |
getButtonSeat()
Gets the seat with the button. |
double |
getCurrentBetSize()
If the current round is the pre-flop or the flop, this is the small bet. |
int |
getCurrentPlayerSeat()
Returns the player who is about to act (during getAction) or who has just acted (during actionEvent or gameStateChanged) |
double |
getEligiblePot(int seat)
Returns the total pot size (infinite bankroll) |
long |
getGameID()
Returns a long between 0 and 999 |
java.lang.String |
getLogDirectory()
There is no log directory in this implementation. |
double |
getMainPotSize()
Same as the total pot size. |
double |
getMinRaise()
Same as the current bet size. |
double |
getNetGain(int seat)
Gets the net gain Returns zero if the game is over. |
int |
getNumActivePlayers()
|
int |
getNumActivePlayersNotAllIn()
|
int |
getNumberOfAllInPlayers()
|
int |
getNumPlayers()
|
int |
getNumRaises()
|
int |
getNumSeats()
|
int |
getNumSidePots()
|
int |
getNumToAct()
|
int |
getNumWinners()
|
PlayerInfo |
getPlayer(int seat)
Returns the player info for a player sitting in the seat. |
PlayerInfo |
getPlayer(java.lang.String name)
Returns the player info for a player with a particular name (names are "0" and "1"). |
java.lang.String |
getPlayerName(int seat)
Returns the name for a player in a seat (names are "0" and "1"). |
int |
getPlayerSeat(java.lang.String name)
|
java.util.List |
getPlayersInPot(double amountIn)
A PlayerInfo is in the list iff they put amountIn or more into the pot themselves. |
double |
getRake()
No rake for the competition |
double |
getSidePotSize(int i)
|
int |
getSmallBlindSeat()
Gets the small blind seat (the button). |
double |
getSmallBlindSize()
Returns the small blind size. |
int |
getStage()
Returns the stage: Holdem.PREFLOP, Holdem.FLOP, Holdem.TURN, or Holdem.RIVER (0-3) |
double |
getStakes()
The largest amount any individual put in the pot this hand. |
double |
getTotalPotSize()
The total pot size. |
int |
getUnacted()
How many players have not folded, checked, called, bet, or raised this stage? |
boolean |
inGame(int seat)
Both players are always in the game |
boolean |
isActive(int seat)
All players are active in heads-up |
boolean |
isCommitted(int seat)
Has the player bet more than his own blind in this stage? |
boolean |
isFixedLimit()
The tournament is fixed limit |
boolean |
isFlop()
Flop indicates the postflop |
boolean |
isGameOver()
|
boolean |
isNoLimit()
The tournament is fixed limit, not "no limit" |
boolean |
isPostFlop()
Returns true if the flop has been dealt but not the turn card (after stageEvent(1), before stageEvent(2)) |
boolean |
isPotLimit()
The tournament is fixed limit, not "pot limit" |
boolean |
isPreFlop()
Returns true if the river card has been dealt (after stageEvent(1), before stageEvent(2)) |
boolean |
isReverseBlinds()
The tournament is reverse blinds, where the button gives a small blind. |
boolean |
isRiver()
Returns true if the river card has been dealt (after stageEvent(3)) |
boolean |
isSimulation()
The tournament is not simulation. |
boolean |
isTurn()
|
boolean |
isZipMode()
The tournament is not "zip mode". |
static int |
nameToSeat(java.lang.String name)
Since names are simply a string with the player index, it is all good. |
int |
nextActivePlayer(int seat)
The next active player. |
int |
nextPlayer(int seat)
Return the other seat. |
int |
nextSeat(int seat)
Since there are only two seats, the next seat from 1 is 0. |
int |
previousPlayer(int seat)
The previous player is the other player. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public PlayerInfoDynamics[] players
Constructor Detail |
---|
public GameInfoImpl(GameInfoDynamics dynamics)
Method Detail |
---|
public static int nameToSeat(java.lang.String name)
public double getNetGain(int seat)
public boolean canRaise(int seat)
public double getAmountToCall(int seat)
public double getAnte()
public double getBankRoll(int seat)
public double getBankRollAtRisk(int seat)
public double getBetsToCall(int seat)
public int getBigBlindSeat()
public double getBigBlindSize()
public Hand getBoard()
public int getButtonSeat()
public double getCurrentBetSize()
public int getCurrentPlayerSeat()
public double getEligiblePot(int seat)
public long getGameID()
public java.lang.String getLogDirectory()
public double getMainPotSize()
public double getMinRaise()
public int getNumActivePlayers()
public int getNumActivePlayersNotAllIn()
public int getNumberOfAllInPlayers()
public int getNumPlayers()
public int getNumRaises()
public int getNumSeats()
public int getNumSidePots()
public int getNumToAct()
public int getNumWinners()
public PlayerInfo getPlayer(int seat)
public PlayerInfo getPlayer(java.lang.String name)
public java.lang.String getPlayerName(int seat)
public int getPlayerSeat(java.lang.String name)
public java.util.List getPlayersInPot(double amountIn)
public double getRake()
public double getSidePotSize(int i)
public int getSmallBlindSeat()
public double getSmallBlindSize()
public int getStage()
public double getStakes()
public double getTotalPotSize()
public int getUnacted()
public boolean inGame(int seat)
public boolean isActive(int seat)
public boolean isCommitted(int seat)
public boolean isFixedLimit()
public boolean isFlop()
public boolean isGameOver()
public boolean isNoLimit()
public boolean isPostFlop()
public boolean isPotLimit()
public boolean isPreFlop()
public boolean isReverseBlinds()
public boolean isRiver()
public boolean isSimulation()
public boolean isTurn()
public boolean isZipMode()
public int nextActivePlayer(int seat)
public int nextPlayer(int seat)
public int nextSeat(int seat)
public int previousPlayer(int seat)
public static Hand convertToHand(Card[] cards)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |