com.asdf.plugins.pokergames
Class GameModel

java.lang.Object
  extended by com.asdf.plugins.pokergames.GameModel
All Implemented Interfaces:
GameInfo, java.lang.Cloneable

public class GameModel
extends java.lang.Object
implements GameInfo, java.lang.Cloneable

Contains all the state information of the game and players


Field Summary
static java.lang.String NIL_OBJECT
           
static java.lang.String RESERVE_OBJECT
           
 
Constructor Summary
GameModel(double smallBlind, double bigBlind, int minPlayers, int maxPlayers, long gameID, Stage stage)
          Constructor for a new GameModel at the beginning of a table
GameModel(GameModelInfoMessage gmi)
           
 
Method Summary
 void activatePlayer(int player)
           
 void addCardToBoard(Card card1)
          adds the given card to be the last in the board cards
 void addRaisesThisRound()
          increase the number of raises this round by one
 void addToPot(double amount)
           
 boolean canRaise(int seat)
          See if the player in the given seat is able to raise Calls the PlayerInfo's corresponding method.
static GameModel clone(GameModel previous)
           
static GameModel clone(GameModelInfoMessage previous)
          Little helper who creates an independent copy of given GameModel
static GameModel cloneWithoutPreviousStates(GameModel previous)
           
 void decreasePlayersToAct()
          decrease the number of Players to act by one
 void freeSeat(int seat)
           
 double getAmountToCall(int seat)
          Get a player's amount to call Calls the PlayerInfo's corresponding method.
 double getAnte()
          Get the amount of the ante, if any
 double getBankRoll(int seat)
          Get a player's bankroll Calls the PlayerInfo's corresponding method.
 double getBetsToCall(int seat)
          from GameInfo, get the maximum amount the player in the given seat can risk in this hand.
 double getBigBlind()
           
 int getBigBlindSeat()
          Get the big blind seat
 int getBigBlindSeatFromButton()
           
 double getBigBlindSize()
          Get the amount of the big blind.
 double getBiggestBet()
          TODO find out what testing
 Hand getBoard()
          Get the board cards
 Hand getBoardCards()
           
 int getButtonSeat()
          Get the seat the button is on (could be dead button)
 int getCountablePlayers()
           
 double getCurrentBetSize()
          Get the amount of the betting increment (for fixed-limit)
 PlayerInfo getCurrentPlayer()
           
 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 eligible to win.
 long getGameID()
          The game identifier for this table
 GameModelInfoMessage getGameModelInfo()
          returns the fields of the model, for sending in messages
 boolean getIsSimulation()
           
 boolean getIsZipMode()
           
 int getLimitStyle()
           
 double getMainPotSize()
          from GameInfo, get the Log Directory used by all players for keeping logs
 int getMaxPlayers()
           
 int getMinPlayers()
           
 double getMinRaise()
          Get the smallest legal raise
 int getNumActivePlayers()
          Get the number of players still active (not folded) in the hand
 int getNumActivePlayersNotAllIn()
          Get 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()
          Get the number of bets and raises made during the current betting round
 int getNumSeats()
          The number of seats at the table
 int getNumToAct()
          from GameInfo, get the number of side pots
 int getNumWinners()
          Get the number of players that were awarded a pot in this hand
 OurPlayerInfo getOurPlayer(int seat)
          Get OurPlayerInfo from player in the given seat, to update his fields Use getPlayer if you just want to ask for the fields
 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 with a given name
 java.lang.String getPlayerName(int seat)
          Get the name of the player in a given seat
 PlayerInfoFieldsMessage[] getPlayers()
           
 int getPlayerSeat(java.lang.String name)
          Get the seat number for a player by name
 java.util.List<PlayerInfo> getPlayersInPot(double amount)
          Get a list of all players eligible to win a pot with the given minimum stakes
 double getPot()
           
 int getRaisesThisRound()
           
 boolean getReverseBlinds()
           
 int getSittingPlayers()
           
 double getSmallBlind()
           
 int getSmallBlindSeat()
          from GameInfo, Get the amount raked from pot so far, not implemented
 int getSmallBlindSeatFromButton()
           
 double getSmallBlindSize()
          Get the amount of the small blind
 Stage getStage()
          Get the current game stage
 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
 int getWinners()
           
 PokerGame.Blind hasToPostBlind(int seat)
          Get whether the player has sat out some blinds, and has to pay any as a penalty for entering the game
 void increaseWinners()
          increase the number of winners by one
 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 isNoLimit()
          from GameInfo, See if the hand is over
 boolean isPotLimit()
          from GameInfo, See if it is currently the post-flop
 boolean isReserved(int seat)
          See if given seat is reserved
 boolean isReverseBlinds()
          from GameInfo, See if it is currently the pre-flop
 boolean isSimulation()
          from GameInfo, see if it is currently the river round
 boolean isZipMode()
          from GameInfo, see if it is currently the turn round
static void main(java.lang.String[] args)
           
 double maxBuy()
          return the maximum amount to bring to this table
 void maxPlayersToAct()
          increase the number of Players to act to the maximum
 double minBuy()
          return the minimum amount to bring to this table
 void moveBigBlindSeat()
          use to move the big blind seat, when the player who should pay refuses
 void moveSmallBlindSeat()
          use to move the big blind and small blind seats, when the player who should pay small blind refuses
 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 active player at the table (skips empty seats and folded players)
 int nextSeat(int seat)
          Get the seat number of the next seat clockwise at the table
 int previousPlayer(int seat)
          Get the seat number of the previous player at the table (skips empty seats)
 boolean reserveSeat(int seat)
          Sets the given seat to be reserved
 void setAnte(int ante)
          set ante
 void setBigBlind(double bigBlind)
          set the big blind
 void setBigBlindSeat(int seat)
          Sets the big blind seat
 void setBoardCards(Hand boardCards)
          Set the given hand as the board cards
 void setButtonSeat(int buttonSeat)
          Set the button seat
 void setCurrentPlayerSeat(int currentPlayerSeat)
          Set the current player
 void setGameID(long gameID)
          set the game ID
 void setIsSimulation(boolean isSimulation)
          set if the game is Simulation
 void setIsZipMode(boolean isZipMode)
          set if the game is in zipMode
 void setLimitStyle(int limitStyle)
           
 void setMinPlayers(int minPlayers)
          set minPlayers
 void setMinRaise(double minRaise)
          set minRaise
 void setNextActivePlayer()
           
 void setNextPlayer()
           
 void setPlayer(int seat, OurPlayerInfo player)
          Sets given players info to the given seat, is seat is taken, the previous player will be removed
 void setPlayer(int seat, PlayerInfoFieldsMessage player)
          Sets given players info to the given seat, is seat is taken, the previous player will be removed
 void setPlayers(PlayerInfoFieldsMessage[] players)
          Removes all the players from the gameModel, and sets the given players infos in their stead
 void setPlayersToAct(int playersToAct)
          set the number of players to act
 void setPot(double pot)
          set the pot
 void setRaisesThisRound(int raisesThisRound)
          set the number of raises this round
 void setReverseBlinds(boolean reverseBlinds)
          set if the heads-up is in reverseblinds order, by default it is
 void setSmallBlind(double smallBlind)
          set the small blind
 void setSmallBlindSeat(int seat)
          Sets the small blind seat
 void setStage(Stage stage)
          Set the stage
 void setStartPlayers(int maxPlayers)
           
 Stage Stage()
           
 void startHand()
          removes history information from the players
 int update(GameModel newModel)
          Little helper who changes this GameModel to have the same values as the given GameModel Saves that previous state of the model to the lastgameinfo of the previous currentplayer
 void zeroWinners()
          set the number of winners to zero
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NIL_OBJECT

public static final java.lang.String NIL_OBJECT
See Also:
Constant Field Values

RESERVE_OBJECT

public static final java.lang.String RESERVE_OBJECT
See Also:
Constant Field Values
Constructor Detail

GameModel

public GameModel(double smallBlind,
                 double bigBlind,
                 int minPlayers,
                 int maxPlayers,
                 long gameID,
                 Stage stage)
Constructor for a new GameModel at the beginning of a table

Parameters:
stage - stage of the game
smallBlind - small blind for the hand
bigBlind - Big blind for the hand
minPlayers - minimum amount of required players
maxPlayers - maximum players at the table
gameID - ID for the first hand to be played

GameModel

public GameModel(GameModelInfoMessage gmi)
Method Detail

minBuy

public double minBuy()
return the minimum amount to bring to this table

Specified by:
minBuy in interface GameInfo
Returns:
maximum amount

maxBuy

public double maxBuy()
return the maximum amount to bring to this table

Specified by:
maxBuy in interface GameInfo
Returns:
maximum amount

getBiggestBet

public double getBiggestBet()
TODO find out what testing

Returns:
the biggest bet

startHand

public void startHand()
removes history information from the players


getSmallBlindSeatFromButton

public int getSmallBlindSeatFromButton()
Returns:
returns the seat that would pay smallb lind, if all players in between are active

setSmallBlindSeat

public void setSmallBlindSeat(int seat)
Sets the small blind seat

Parameters:
seat -

setBigBlindSeat

public void setBigBlindSeat(int seat)
Sets the big blind seat

Parameters:
seat -

moveBigBlindSeat

public void moveBigBlindSeat()
use to move the big blind seat, when the player who should pay refuses


moveSmallBlindSeat

public void moveSmallBlindSeat()
use to move the big blind and small blind seats, when the player who should pay small blind refuses


getBigBlindSeatFromButton

public int getBigBlindSeatFromButton()
Returns:
returns the seat that would pay big blind, if all players in between are active

reserveSeat

public boolean reserveSeat(int seat)
Sets the given seat to be reserved

Parameters:
seat -
Returns:
true if the seat was free and was reserved

getGameModelInfo

public GameModelInfoMessage getGameModelInfo()
returns the fields of the model, for sending in messages


getMaxPlayers

public int getMaxPlayers()
Returns:
maxplayers the maximum number of players allowed in the table

setLimitStyle

public void setLimitStyle(int limitStyle)
Parameters:
limitStyle - set Fixed, Pot, or No Limit

getLimitStyle

public int getLimitStyle()
Returns:
is this Fixed, Pot, or No Limit

setMinRaise

public void setMinRaise(double minRaise)
set minRaise

Parameters:
minRaise -

setMinPlayers

public void setMinPlayers(int minPlayers)
set minPlayers

Parameters:
minPlayers -

getMinPlayers

public int getMinPlayers()
Returns:
minPlayers

setAnte

public void setAnte(int ante)
set ante

Parameters:
ante -

freeSeat

public void freeSeat(int seat)

setPlayers

public void setPlayers(PlayerInfoFieldsMessage[] players)
Removes all the players from the gameModel, and sets the given players infos in their stead

Parameters:
players -

setPlayer

public void setPlayer(int seat,
                      PlayerInfoFieldsMessage player)
Sets given players info to the given seat, is seat is taken, the previous player will be removed

Parameters:
seat -
player -

setStartPlayers

public void setStartPlayers(int maxPlayers)

setPlayer

public void setPlayer(int seat,
                      OurPlayerInfo player)
Sets given players info to the given seat, is seat is taken, the previous player will be removed

Parameters:
seat -
player -

getPlayers

public PlayerInfoFieldsMessage[] getPlayers()
Returns:
the players infos including reserving and null objects in the game as an array

setButtonSeat

public void setButtonSeat(int buttonSeat)
Set the button seat

Parameters:
buttonSeat -

setBigBlind

public void setBigBlind(double bigBlind)
set the big blind

Parameters:
bigBlind -

getBigBlind

public double getBigBlind()
Returns:
the big blind

setSmallBlind

public void setSmallBlind(double smallBlind)
set the small blind

Parameters:
smallBlind -

getSmallBlind

public double getSmallBlind()
Returns:
the small blind

setBoardCards

public void setBoardCards(Hand boardCards)
Set the given hand as the board cards

Parameters:
boardCards -

getBoardCards

public Hand getBoardCards()
Returns:
the board cards

addCardToBoard

public void addCardToBoard(Card card1)
adds the given card to be the last in the board cards

Parameters:
card1 -

setCurrentPlayerSeat

public void setCurrentPlayerSeat(int currentPlayerSeat)
Set the current player

Parameters:
currentPlayerSeat -

setGameID

public void setGameID(long gameID)
set the game ID

Parameters:
gameID -

setRaisesThisRound

public void setRaisesThisRound(int raisesThisRound)
set the number of raises this round

Parameters:
raisesThisRound -

getRaisesThisRound

public int getRaisesThisRound()
Returns:
the number of raises this round

addRaisesThisRound

public void addRaisesThisRound()
increase the number of raises this round by one


setPot

public void setPot(double pot)
set the pot

Parameters:
pot -

getPot

public double getPot()
Returns:
the pot

addToPot

public void addToPot(double amount)

setStage

public void setStage(Stage stage)
Set the stage

Parameters:
stage -

Stage

public Stage Stage()
Returns:
the current stage

setIsSimulation

public void setIsSimulation(boolean isSimulation)
set if the game is Simulation

Parameters:
isSimulation -

getIsSimulation

public boolean getIsSimulation()
Returns:
if the game is simulation

setIsZipMode

public void setIsZipMode(boolean isZipMode)
set if the game is in zipMode

Parameters:
isZipMode -

getIsZipMode

public boolean getIsZipMode()
Returns:
if the game is in zipMode

setReverseBlinds

public void setReverseBlinds(boolean reverseBlinds)
set if the heads-up is in reverseblinds order, by default it is

Parameters:
reverseBlinds -

getReverseBlinds

public boolean getReverseBlinds()
Returns:
if it is reverse blinds

getOurPlayer

public OurPlayerInfo getOurPlayer(int seat)
Get OurPlayerInfo from player in the given seat, to update his fields Use getPlayer if you just want to ask for the fields

Parameters:
seat -
Returns:
OurPlayerInfo

decreasePlayersToAct

public void decreasePlayersToAct()
decrease the number of Players to act by one


maxPlayersToAct

public void maxPlayersToAct()
increase the number of Players to act to the maximum


setPlayersToAct

public void setPlayersToAct(int playersToAct)
set the number of players to act

Parameters:
playersToAct -

increaseWinners

public void increaseWinners()
increase the number of winners by one


zeroWinners

public void zeroWinners()
set the number of winners to zero


getWinners

public int getWinners()
Returns:
the number of winners;

update

public int update(GameModel newModel)
Little helper who changes this GameModel to have the same values as the given GameModel Saves that previous state of the model to the lastgameinfo of the previous currentplayer

Parameters:
newModel - GameModel to imitate
Returns:
1 if the current player has changed 2 if the stage has changed, 0 otherwise

clone

public static GameModel clone(GameModelInfoMessage previous)
Little helper who creates an independent copy of given GameModel

Parameters:
previous -
Returns:
the clone of given GameModel

clone

public static GameModel clone(GameModel previous)

cloneWithoutPreviousStates

public static GameModel cloneWithoutPreviousStates(GameModel previous)

getSittingPlayers

public int getSittingPlayers()
Returns:
the number of players in the table

canRaise

public boolean canRaise(int seat)
Description copied from interface: GameInfo
See if the player in the given seat is able to raise Calls the PlayerInfo's corresponding method.

Specified by:
canRaise in interface GameInfo
Parameters:
seat - position of the player
Returns:
true if the player has enough chips to raise after calling

getAmountToCall

public double getAmountToCall(int seat)
Description copied from interface: GameInfo
Get a player's amount to call Calls the PlayerInfo's corresponding method.

Specified by:
getAmountToCall in interface GameInfo
Parameters:
seat - position of the player
Returns:
the amount given player has to call

getAnte

public double getAnte()
Description copied from interface: GameInfo
Get the amount of the ante, if any

Specified by:
getAnte in interface GameInfo
Returns:
the value of ante

getBankRoll

public double getBankRoll(int seat)
Description copied from interface: GameInfo
Get a player's bankroll Calls the PlayerInfo's corresponding method.

Specified by:
getBankRoll in interface GameInfo
Parameters:
seat - position of the player
Returns:
the given player's bankroll

getBetsToCall

public double getBetsToCall(int seat)
from GameInfo, get the maximum amount the player in the given seat can risk in this hand. Calls the PlayerInfo's corresponding method.

Specified by:
getBetsToCall in interface GameInfo
Parameters:
seat - position of the player
Throws:
InvalidSeatException, - if the table does not have such a seat
EmptySeatException, - if the given seat is empty public double getBankRollAtRisk(int seat) { if (seat<0 || seat>=this.getMaxPlayers()) throw new InvalidSeatException(); if (this.getPlayer(seat) == null) throw new EmptySeatException(); return this.getPlayer(seat).getBankRollAtRisk(); }

getBigBlindSeat

public int getBigBlindSeat()
Description copied from interface: GameInfo
Get the big blind seat

Specified by:
getBigBlindSeat in interface GameInfo
Returns:
the big blind seat

getBigBlindSize

public double getBigBlindSize()
Description copied from interface: GameInfo
Get the amount of the big blind.

Specified by:
getBigBlindSize in interface GameInfo
Returns:
the amount of the big blind

getBoard

public Hand getBoard()
Description copied from interface: GameInfo
Get the board cards

Specified by:
getBoard in interface GameInfo
Returns:
new hand with the board cards

getButtonSeat

public int getButtonSeat()
Description copied from interface: GameInfo
Get the seat the button is on (could be dead button)

Specified by:
getButtonSeat in interface GameInfo
Returns:
button seat

getCurrentBetSize

public double getCurrentBetSize()
Description copied from interface: GameInfo
Get the amount of the betting increment (for fixed-limit)

Specified by:
getCurrentBetSize in interface GameInfo
Returns:
current bet size, nothing relevant if not fixed-limit

getCurrentPlayerSeat

public int getCurrentPlayerSeat()
Description copied from interface: GameInfo
Get the seat for the current player to act

Specified by:
getCurrentPlayerSeat in interface GameInfo
Returns:
the seat for the current player to act

getEligiblePot

public double getEligiblePot(int seat)
Description copied from interface: GameInfo
Get the amount in the pot that a player is eligible to win.

Specified by:
getEligiblePot in interface GameInfo
Parameters:
seat - position of the player
Returns:
the amount the player is eligible to win

getGameID

public long getGameID()
Description copied from interface: GameInfo
The game identifier for this table

Specified by:
getGameID in interface GameInfo
Returns:
the gameID

getMainPotSize

public double getMainPotSize()
from GameInfo, get the Log Directory used by all players for keeping logs

Specified by:
getMainPotSize in interface GameInfo
Returns:
the log directory TODO what? how do we log? public String getLogDirectory() { return null; }

getMinRaise

public double getMinRaise()
Description copied from interface: GameInfo
Get the smallest legal raise

Specified by:
getMinRaise in interface GameInfo
Returns:
the minimum raise

getNumActivePlayers

public int getNumActivePlayers()
Description copied from interface: GameInfo
Get the number of players still active (not folded) in the hand

Specified by:
getNumActivePlayers in interface GameInfo
Returns:
the number of active players

getNumActivePlayersNotAllIn

public int getNumActivePlayersNotAllIn()
Description copied from interface: GameInfo
Get the number of active players that are not all-in

Specified by:
getNumActivePlayersNotAllIn in interface GameInfo
Returns:
the number of players not all-in

getNumPlayers

public int getNumPlayers()
Description copied from interface: GameInfo
Get the number of players dealt into the hand

Specified by:
getNumPlayers in interface GameInfo
Returns:
the number of players dealt in to the hand

getNumRaises

public int getNumRaises()
Description copied from interface: GameInfo
Get the number of bets and raises made during the current betting round

Specified by:
getNumRaises in interface GameInfo
Returns:
the number of raises made during current round

getNumSeats

public int getNumSeats()
Description copied from interface: GameInfo
The number of seats at the table

Specified by:
getNumSeats in interface GameInfo
Returns:
the number of seats

getNumToAct

public int getNumToAct()
from GameInfo, get the number of side pots

Specified by:
getNumToAct in interface GameInfo
Returns:
the number of side pots

getNumWinners

public int getNumWinners()
Description copied from interface: GameInfo
Get the number of players that were awarded a pot in this hand

Specified by:
getNumWinners in interface GameInfo
Returns:
the number of winners

getNumberOfAllInPlayers

public int getNumberOfAllInPlayers()
Description copied from interface: GameInfo
Get the number of players in the hand that are all-in

Specified by:
getNumberOfAllInPlayers in interface GameInfo
Returns:
number of players all-in

getPlayer

public PlayerInfo getPlayer(int seat)
Description copied from interface: GameInfo
Get state information for a player in a given seat

Specified by:
getPlayer in interface GameInfo
Parameters:
seat - position of the player
Returns:
PlayerInfo for given player, or null if seat is empty

getPlayer

public PlayerInfo getPlayer(java.lang.String name)
Description copied from interface: GameInfo
Get state information for a player with a given name

Specified by:
getPlayer in interface GameInfo
Parameters:
name - the name of desired player
Returns:
PlayerInfo for given player, or null if not found

getPlayerName

public java.lang.String getPlayerName(int seat)
Description copied from interface: GameInfo
Get the name of the player in a given seat

Specified by:
getPlayerName in interface GameInfo
Parameters:
seat - position of the player
Returns:
the name of the player in the seat

getPlayerSeat

public int getPlayerSeat(java.lang.String name)
Description copied from interface: GameInfo
Get the seat number for a player by name

Specified by:
getPlayerSeat in interface GameInfo
Parameters:
name - the name of the player
Returns:
the seat the player is in or -1 if not found

getPlayersInPot

public java.util.List<PlayerInfo> getPlayersInPot(double amount)
Description copied from interface: GameInfo
Get a list of all players eligible to win a pot with the given minimum stakes

Specified by:
getPlayersInPot in interface GameInfo
Parameters:
amount - 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

getSmallBlindSeat

public int getSmallBlindSeat()
from GameInfo, Get the amount raked from pot so far, not implemented

Specified by:
getSmallBlindSeat in interface GameInfo
Returns:
0 TODO do we need these? public double getRake() { return 0; }

getSmallBlindSize

public double getSmallBlindSize()
Description copied from interface: GameInfo
Get the amount of the small blind

Specified by:
getSmallBlindSize in interface GameInfo
Returns:
small blind size

getStage

public Stage getStage()
Description copied from interface: GameInfo
Get the current game stage

Specified by:
getStage in interface GameInfo
Returns:
the current stage

getStakes

public double getStakes()
Description copied from interface: GameInfo
The stakes are the amount each player must have invested in the pot to stay active in the hand.

Specified by:
getStakes in interface GameInfo
Returns:
the stakes

getTotalPotSize

public double getTotalPotSize()
Description copied from interface: GameInfo
Get the total size of the pot including the main pot and all side pots.

Specified by:
getTotalPotSize in interface GameInfo
Returns:
total pot size

getUnacted

public int getUnacted()
Description copied from interface: GameInfo
Get the number of players who have not acted yet this round

Specified by:
getUnacted in interface GameInfo
Returns:
the number of players not yet acted

inGame

public boolean inGame(int seat)
Description copied from interface: GameInfo
See if the player in the given seat is dealt into the hand (not sitting out or empty).

Specified by:
inGame in interface GameInfo
Parameters:
seat - position of the player
Returns:
true if the player is dealt in

isActive

public boolean isActive(int seat)
Description copied from interface: GameInfo
See if the player in the given seat is still active in the hand

Specified by:
isActive in interface GameInfo
Parameters:
seat - position of the player
Returns:
true if player is active

isCommitted

public boolean isCommitted(int seat)
Description copied from interface: GameInfo
See if a player has invested anything in the current round

Specified by:
isCommitted in interface GameInfo
Parameters:
seat - position of the player
Returns:
true if the player has invested

isFixedLimit

public boolean isFixedLimit()
Description copied from interface: GameInfo
Determine if the game is fixed-limit

Specified by:
isFixedLimit in interface GameInfo
Returns:
true if the game is fixed-limit

isNoLimit

public boolean isNoLimit()
from GameInfo, See if the hand is over

Specified by:
isNoLimit in interface GameInfo
Returns:
true if the hand is over

isPotLimit

public boolean isPotLimit()
from GameInfo, See if it is currently the post-flop

Specified by:
isPotLimit in interface GameInfo
Returns:
true if it is post-flop

isReverseBlinds

public boolean isReverseBlinds()
from GameInfo, See if it is currently the pre-flop

Specified by:
isReverseBlinds in interface GameInfo
Returns:
true if it is pre-flop

isSimulation

public boolean isSimulation()
from GameInfo, see if it is currently the river round

Specified by:
isSimulation in interface GameInfo
Returns:
true if it is the river

isZipMode

public boolean isZipMode()
from GameInfo, see if it is currently the turn round

Specified by:
isZipMode in interface GameInfo
Returns:
true if it is the turn

nextActivePlayer

public int nextActivePlayer(int seat)
Description copied from interface: GameInfo
Get the seat number of the next active player at the table (skips empty seats and folded players)

Specified by:
nextActivePlayer in interface GameInfo
Parameters:
seat - position
Returns:
the seat number of the next active player

nextPlayer

public int nextPlayer(int seat)
Description copied from interface: GameInfo
Get the seat number of the next active player at the table (skips empty seats and folded players)

Specified by:
nextPlayer in interface GameInfo
Parameters:
seat - position
Returns:
the seat number of the next active player

nextSeat

public int nextSeat(int seat)
Description copied from interface: GameInfo
Get the seat number of the next seat clockwise at the table

Specified by:
nextSeat in interface GameInfo
Parameters:
seat - position
Returns:
the next seat number

previousPlayer

public int previousPlayer(int seat)
Description copied from interface: GameInfo
Get the seat number of the previous player at the table (skips empty seats)

Specified by:
previousPlayer in interface GameInfo
Parameters:
seat - position
Returns:
seat number of previous player

setNextPlayer

public void setNextPlayer()

setNextActivePlayer

public void setNextActivePlayer()

getCurrentPlayer

public PlayerInfo getCurrentPlayer()

getCountablePlayers

public int getCountablePlayers()

activatePlayer

public void activatePlayer(int player)

hasToPostBlind

public PokerGame.Blind hasToPostBlind(int seat)
Description copied from interface: GameInfo
Get whether the player has sat out some blinds, and has to pay any as a penalty for entering the game

Specified by:
hasToPostBlind in interface GameInfo
Parameters:
seat - of the player
Returns:
missed blinds

isReserved

public boolean isReserved(int seat)
Description copied from interface: GameInfo
See if given seat is reserved

Specified by:
isReserved in interface GameInfo
Returns:
true if the seat is reserved

main

public static void main(java.lang.String[] args)