glassfrog.players
Class GUIPlayer
java.lang.Object
glassfrog.players.Player
glassfrog.players.SocketPlayer
glassfrog.players.GUIPlayer
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<Player>
public class GUIPlayer
- extends SocketPlayer
This class allows for the packaged Swordfish GUI to be connected as a Player.
At this time, the GUI only allows for graphical representation of 2 Players,
and thus should only be used for 2 Player games.
- Author:
- jdavidso
- See Also:
- Serialized Form
Constructor Summary |
GUIPlayer(java.lang.String name,
int buyIn,
java.net.Socket socket)
Constructor for a GUI Player |
Method Summary |
void |
initTimeout(int timeout)
Used to set the player timeout to 60s per hand |
boolean |
isGuiPlayer()
Overrides the @Player isGuiPlayer method and returns True |
java.lang.String |
toString()
Returns GUI appended to the @Player representation of the object |
Methods inherited from class glassfrog.players.Player |
addToScore, bet, call, compareTo, fold, getBuyIn, getCardString, getCurrentBet, getHandRank, getHandString, getName, getPosition, getScore, getSeat, getStack, getTotalCommitedToPot, isAAAIPlayer, isActed, isAllIn, isFolded, payout, postBlind, resetHand, resetPlayer, resetRound, resetStack, setBuyIn, setCardString, setHandRank, setHandString, setName, setPosition, setScore, setSeat, setStack, subtractTotalCommitedToPot, toShortString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
GUIPlayer
public GUIPlayer(java.lang.String name,
int buyIn,
java.net.Socket socket)
throws java.io.IOException
- Constructor for a GUI Player
- Parameters:
name
- a @String representing the player's namebuyIn
- an int representing the requested buyIn amountsocket
- asocket for GUI to connect to
- Throws:
java.io.IOException
isGuiPlayer
public boolean isGuiPlayer()
- Overrides the @Player isGuiPlayer method and returns True
- Overrides:
isGuiPlayer
in class Player
- Returns:
- True
toString
public java.lang.String toString()
- Returns GUI appended to the @Player representation of the object
- Overrides:
toString
in class Player
- Returns:
- GUI appended to the front of the @Player toString method
initTimeout
public void initTimeout(int timeout)
- Used to set the player timeout to 60s per hand
- Overrides:
initTimeout
in class Player
- Parameters:
timeout
- Timeout for the player's actions