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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BotPlayer
public BotPlayer(java.lang.String pfile)
- Constructor.
- Parameters:
p
- An implementation of a Player.server
- the address of the serverport
- the server port numbernick
- the player's user namepwd
- 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 serverport
- the server port numbernick
- the player's user namepwd
- the player's password
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.