ca.ualberta.cs.poker.free.server
Class PAProTCPPlugin

java.lang.Object
  extended by ca.ualberta.cs.poker.free.server.PAProTCPPlugin

public class PAProTCPPlugin
extends java.lang.Object


Constructor Summary
PAProTCPPlugin()
          Creates a new instance of TCPPlugin
 
Method Summary
 void actionEvent(int pos, com.biotools.meerkat.Action act)
           
 void dealHoleCardsEvent()
           
 void gameOverEvent()
           
 void gameStartEvent(GameInfo info)
           
 void gameStateChanged()
           
 com.biotools.meerkat.Action getAction()
           
 char getActionFromResponse(java.lang.String response)
          Gets the last character of a response, which should be 'c', 'r', or 'f'
 java.lang.String getMatchState()
           
 void holeCards(Card h1, Card h2, int seat)
           
 void init(Preferences prefs)
           
 boolean isAppropriate(java.lang.String response)
          Tests if a response is actually a response to the CURRENT action.
 com.biotools.meerkat.Action receiveAction()
           
 void sendMatchState()
           
 void showdownEvent(int seat, Card c1, Card c2)
           
 void stageEvent(int pos)
           
 void waitForClient()
           
 void winEvent(int seat, double amount, java.lang.String cards)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PAProTCPPlugin

public PAProTCPPlugin()
Creates a new instance of TCPPlugin

Method Detail

init

public void init(Preferences prefs)

getAction

public com.biotools.meerkat.Action getAction()

stageEvent

public void stageEvent(int pos)

actionEvent

public void actionEvent(int pos,
                        com.biotools.meerkat.Action act)

gameStartEvent

public void gameStartEvent(GameInfo info)

gameStateChanged

public void gameStateChanged()

holeCards

public void holeCards(Card h1,
                      Card h2,
                      int seat)

dealHoleCardsEvent

public void dealHoleCardsEvent()

winEvent

public void winEvent(int seat,
                     double amount,
                     java.lang.String cards)

gameOverEvent

public void gameOverEvent()

showdownEvent

public void showdownEvent(int seat,
                          Card c1,
                          Card c2)

receiveAction

public com.biotools.meerkat.Action receiveAction()
                                          throws java.io.IOException,
                                                 SyncException
Throws:
java.io.IOException
SyncException

isAppropriate

public boolean isAppropriate(java.lang.String response)
Tests if a response is actually a response to the CURRENT action.


getActionFromResponse

public char getActionFromResponse(java.lang.String response)
Gets the last character of a response, which should be 'c', 'r', or 'f'


sendMatchState

public void sendMatchState()
                    throws TimeoutException
Throws:
TimeoutException

getMatchState

public java.lang.String getMatchState()

waitForClient

public void waitForClient()