ca.ualberta.cs.poker.free.client
Class AdvancedPokerClient

java.lang.Object
  extended by ca.ualberta.cs.poker.free.client.PokerClient
      extended by ca.ualberta.cs.poker.free.client.AdvancedPokerClient
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
TablePokerClient

public class AdvancedPokerClient
extends PokerClient

An extension of PokerClient that contains a reference to a reproduction of what is happening on the server side (state). Can overload takeAction() (instead of handleStateChange()) to only receive messages when it is your turn to act. As before, actions can be taken with sendFold, sendCall(), and sendRaise()


Field Summary
 ClientPokerDynamics state
          A reproduction of what is happening on the server side.
 
Fields inherited from class ca.ualberta.cs.poker.free.client.PokerClient
currentGameStateString
 
Constructor Summary
AdvancedPokerClient()
          Creates a new instance of AdvancedPokerClient.
 
Method Summary
 void handleStateChange()
          Handles the state change.
 void takeAction()
          Overload to take actions.
 
Methods inherited from class ca.ualberta.cs.poker.free.client.PokerClient
close, connect, getClientID, isComplete, receiveMessage, run, sendAction, sendCall, sendFold, sendMessage, sendRaise, setVerbose, showVerbose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

state

public ClientPokerDynamics state
A reproduction of what is happening on the server side.

Constructor Detail

AdvancedPokerClient

public AdvancedPokerClient()
Creates a new instance of AdvancedPokerClient. Must call connect(), then run() to start process

Method Detail

handleStateChange

public void handleStateChange()
Handles the state change. Updates state and calls takeAction()

Overrides:
handleStateChange in class PokerClient

takeAction

public void takeAction()
Overload to take actions.