poker.online
Class BotPlayer

java.lang.Object
  |
  +--poker.online.BotPlayer
All Implemented Interfaces:
java.lang.Runnable

public class BotPlayer
extends java.lang.Object
implements java.lang.Runnable

BotPlayer handles all of the network communication needed to play on the poker server. Simply implement the Player interface, and give the server details to BotPlayer, and your program will be able to play online.


Constructor Summary
BotPlayer(Player p, java.lang.String server, int port, java.lang.String nick, java.lang.String pwd)
          Constructor.
BotPlayer(java.lang.String pfile)
          Constructor.
 
Method Summary
protected  void chat(java.lang.String s)
           
protected  void doChatter(java.lang.String s)
           
static void main(java.lang.String[] args)
          Main entry point.
 void println(java.lang.String str)
           
 void printTable()
           
 void quitGame()
           
 void run()
           
 void shutdown()
           
protected  void updatePlayers(int action, int code)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BotPlayer

public BotPlayer(java.lang.String pfile)
Constructor.
Parameters:
p - An implementation of a Player.
server - the address of the server
port - the server port number
nick - the player's user name
pwd - the player's password

BotPlayer

public BotPlayer(Player p,
                 java.lang.String server,
                 int port,
                 java.lang.String nick,
                 java.lang.String pwd)
Constructor.
Parameters:
p - An implementation of a Player.
server - the address of the server
port - the server port number
nick - the player's user name
pwd - the player's password
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable

updatePlayers

protected void updatePlayers(int action,
                             int code)

println

public final void println(java.lang.String str)

quitGame

public void quitGame()

printTable

public void printTable()

shutdown

public void shutdown()

doChatter

protected void doChatter(java.lang.String s)

chat

protected void chat(java.lang.String s)

main

public static void main(java.lang.String[] args)
Main entry point. Create a player and log onto the server through a BotPlayer.