ca.ualberta.cs.poker.free.client
Class AdvancedPokerClient
java.lang.Object
ca.ualberta.cs.poker.free.client.PokerClient
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()
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 |
state
public ClientPokerDynamics state
- A reproduction of what is happening on the server side.
AdvancedPokerClient
public AdvancedPokerClient()
- Creates a new instance of AdvancedPokerClient. Must call connect(), then run() to start process
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.