|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--GameClient
LOA game client for Gamed server.
Field Summary | |
int |
black_time_control
Number of seconds black player has at start of game, if playing under time controls. |
Move |
move
Move returned by get_move() method as side-effect. |
int |
my_time
Number of seconds the client has currently remaining, if playing under time controls. |
int |
opp_time
Number of seconds the client's opponent has currently remaining, if playing under time controls. |
static int |
STATE_CONTINUE
Game will continue. |
static int |
STATE_DONE
Game over. |
boolean |
time_controls
True if playing under time controls. |
int |
white_time_control
Number of seconds white player has at start of game, if playing under time controls. |
int |
who
Which side this client is playing. |
static int |
WHO_BLACK
Player is black. |
static int |
WHO_NONE
Player is nobody. |
static int |
WHO_OTHER
Player is undefined. |
static int |
WHO_WHITE
Player is white. |
int |
winner
If done, player which won. |
Constructor Summary | |
GameClient(int side,
java.lang.String host,
int server)
Construct a game client, connected to the specified server and ready to play. |
Method Summary | |
int |
get_move()
Get a move from the server. |
int |
make_move(Move m)
Make a move on the server. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int WHO_NONE
public static final int WHO_WHITE
public static final int WHO_BLACK
public static final int WHO_OTHER
public static final int STATE_CONTINUE
public static final int STATE_DONE
public int who
public int winner
public Move move
public boolean time_controls
public int white_time_control
public int black_time_control
public int my_time
public int opp_time
Constructor Detail |
public GameClient(int side, java.lang.String host, int server) throws java.io.IOException
side
- Should be either WHO_WHITE or WHO_BLACK.
Side the client will play.host
- Hostname of the server.server
- Server number of server on host.Method Detail |
public int make_move(Move m) throws java.io.IOException
m
- What move to make.public int get_move() throws java.io.IOException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |