|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.ualberta.cs.poker.free.server.PlayerAgent
public class PlayerAgent
Field Summary | |
---|---|
long |
elapsedSendingTime
The total (match) elapsed sending time. |
static java.lang.String |
messageTerminator
The current message terminator is CR LF (13 10). |
Constructor Summary | |
---|---|
PlayerAgent(java.net.Socket socket,
int playerIndex)
Creates a new instance of PlayerAgent |
Method Summary | |
---|---|
void |
close()
Close the connection to the client. |
void |
incrementBankroll(double d)
Increment the bankroll by d. |
boolean |
isComplete(java.lang.String result)
A message is complete if it ends with the message terminator. |
java.lang.String |
receiveMessage()
Receives a message from the client. |
void |
sendMessage(java.lang.String message)
Send a message to the client. |
void |
setTimeRemaining(long timeRemaining)
Reset the time at the beginning of the hand. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String messageTerminator
public long elapsedSendingTime
Constructor Detail |
---|
public PlayerAgent(java.net.Socket socket, int playerIndex) throws java.net.SocketException, java.io.IOException
java.net.SocketException
java.io.IOException
Method Detail |
---|
public void setTimeRemaining(long timeRemaining)
public void sendMessage(java.lang.String message) throws TimeoutException
TimeoutException
public java.lang.String receiveMessage() throws TimeoutException
TimeoutException
public boolean isComplete(java.lang.String result)
public void close() throws java.io.IOException
java.io.IOException
public void incrementBankroll(double d)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |