ca.ualberta.cs.poker.free.academy25
Class GameInfoDynamics

java.lang.Object
  extended by ca.ualberta.cs.poker.free.academy25.GameInfoDynamics

public class GameInfoDynamics
extends java.lang.Object


Field Summary
 boolean[] active
          folding (or losing) makes a player inactive
 double[] bankroll
          The bankroll: decremented before gameStateChanged, incremented before winEvent
 double[] bankrollAtStart
          The bankroll at the start of the current hand
 int button
          The button is the player who gives the small blind and acts first on the pre-flop.
 int currentPlayerSeat
          NOTE: currentPlayerSeat MUST be changed manually: 1.
 long gameID
          The gameID is the hand number
 boolean gameOver
          Game is over right before the gameOverEvent is called
 boolean[] hasActed
           
 double[] inPot
          The pot: incremented before gameStateChanged, set to zero for a new game
 int[] lastAction
          lastAction[i] last fold(0), call(1), or raise(2) made by the player in seat i, or -1 otherwise.
 int numToAct
          Two at the beginning of the stage, (before first bet or check) Zero at end of stage (after last call), one elsewhere
 int numUnacted
          The number of players that have not folded, checked, called, bet, or raised this round.
 int numWinners
          One after one person wins, two after two people win
 int roundBets
           
static double smallBet
           
 int stage
           
 
Constructor Summary
GameInfoDynamics()
           
 
Method Summary
 void addToPot(int seat, double amount)
           
 void changeCurrentSeat()
          Flipping the currentPlayerSeat.
 void doNewGame(long gameID, int button)
           
 void doPostBetOrRaise()
          Called in-between the action event and the state change Does not change the current seat
 void doPostBigBlind()
          Called in-between the action event and the state change Does not change the current seat
 void doPostCheckOrCall()
          Called in-between the action event and the state change Does not change the current seat
 void doPostFold()
          Called in-between the action event and the state change Does not change the current seat
 void doPostSmallBlind()
          Called in-between the action event and the state change The round bets is incremented during the small blind.
 void doPreGameOver()
          Call this before gameOverEvent()
 void doPreStageEvent(int stage)
          On a new stage, the non-button player begins on all but the first round.
 void doPreTieEvent(int seat)
          This function is for winning the whole pot
 void doPreWinEvent(int seat)
          This function is for winning the whole pot
 double getAmountToBet()
           
 double getAmountToCall()
           
 double getAmountToCall(int seat)
           
 int getOtherSeat(int seat)
           
 void setBoard(java.lang.String cards)
          On a new stage, the non-button player begins on all but the first round.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

button

public int button
The button is the player who gives the small blind and acts first on the pre-flop.


gameID

public long gameID
The gameID is the hand number


stage

public int stage

currentPlayerSeat

public int currentPlayerSeat
NOTE: currentPlayerSeat MUST be changed manually: 1. Before the big blind. 3. after a bet/raise/big blind, then a gameStateChanged event. 4. Before a win event.


roundBets

public int roundBets

gameOver

public boolean gameOver
Game is over right before the gameOverEvent is called


active

public boolean[] active
folding (or losing) makes a player inactive


lastAction

public int[] lastAction
lastAction[i] last fold(0), call(1), or raise(2) made by the player in seat i, or -1 otherwise.


inPot

public double[] inPot
The pot: incremented before gameStateChanged, set to zero for a new game


bankroll

public double[] bankroll
The bankroll: decremented before gameStateChanged, incremented before winEvent


bankrollAtStart

public double[] bankrollAtStart
The bankroll at the start of the current hand


hasActed

public boolean[] hasActed

numUnacted

public int numUnacted
The number of players that have not folded, checked, called, bet, or raised this round.


numToAct

public int numToAct
Two at the beginning of the stage, (before first bet or check) Zero at end of stage (after last call), one elsewhere


numWinners

public int numWinners
One after one person wins, two after two people win


smallBet

public static final double smallBet
See Also:
Constant Field Values
Constructor Detail

GameInfoDynamics

public GameInfoDynamics()
Method Detail

doNewGame

public void doNewGame(long gameID,
                      int button)

getOtherSeat

public int getOtherSeat(int seat)

addToPot

public void addToPot(int seat,
                     double amount)

getAmountToCall

public double getAmountToCall(int seat)

getAmountToCall

public double getAmountToCall()

getAmountToBet

public double getAmountToBet()

doPostSmallBlind

public void doPostSmallBlind()
Called in-between the action event and the state change The round bets is incremented during the small blind. Does not change the current seat


doPostBigBlind

public void doPostBigBlind()
Called in-between the action event and the state change Does not change the current seat


doPostCheckOrCall

public void doPostCheckOrCall()
Called in-between the action event and the state change Does not change the current seat


doPostBetOrRaise

public void doPostBetOrRaise()
Called in-between the action event and the state change Does not change the current seat


doPostFold

public void doPostFold()
Called in-between the action event and the state change Does not change the current seat


doPreWinEvent

public void doPreWinEvent(int seat)
This function is for winning the whole pot


doPreTieEvent

public void doPreTieEvent(int seat)
This function is for winning the whole pot


doPreGameOver

public void doPreGameOver()
Call this before gameOverEvent()


doPreStageEvent

public void doPreStageEvent(int stage)
On a new stage, the non-button player begins on all but the first round.


setBoard

public void setBoard(java.lang.String cards)
On a new stage, the non-button player begins on all but the first round.


changeCurrentSeat

public void changeCurrentSeat()
Flipping the currentPlayerSeat.