poker
Class Pot

java.lang.Object
  extended by poker.Pot
All Implemented Interfaces:
java.io.Serializable

public class Pot
extends java.lang.Object
implements java.io.Serializable

Handles a Pot data structure, which accumulates money from players, and can break into multiple side pots.

Author:
adavidson
See Also:
Serialized Form

Constructor Summary
Pot(GameInfo gi)
           
 
Method Summary
 int getNumPots()
           
 Pot[] getPots()
           
 Pot getSidePot()
           
 int getSize()
           
 int getThreshold()
           
 boolean hasSidePot()
           
 void payPot(int amount, PlayerInfo pi)
           
 int removeUncalledChips()
          Remove all uncalled chips from the pot
 int removeUncalledChips(Pot p)
          Remove all uncalled chips from the pot
 void setThreshold(int t)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pot

public Pot(GameInfo gi)
Method Detail

payPot

public void payPot(int amount,
                   PlayerInfo pi)

getSidePot

public Pot getSidePot()

setThreshold

public void setThreshold(int t)

getThreshold

public int getThreshold()

getSize

public int getSize()

getPots

public Pot[] getPots()

getNumPots

public int getNumPots()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hasSidePot

public boolean hasSidePot()
Returns:
true if there is a side pot

removeUncalledChips

public int removeUncalledChips()
Remove all uncalled chips from the pot

Returns:
the amount removed from the pot.

removeUncalledChips

public int removeUncalledChips(Pot p)
Remove all uncalled chips from the pot

Returns:
the amount removed from the pot.