|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.moyoman.comm.client.Player | +--org.moyoman.comm.client.ValidatedPlayer | +--org.moyoman.comm.client.MoyomanPlayer
The MoyomanPlayer is a Player class which uses the Moyoman server to play.
Field Summary | |
(package private) CommandExecutor |
ce
The CommandExecutor object which is used for executing commands on the server. |
(package private) String |
id
The id of the game. |
Fields inherited from class org.moyoman.comm.client.Player |
color, handicap |
Constructor Summary | |
protected |
MoyomanPlayer(Color c,
Handicap h,
CommandExecutor ce,
GameId gid)
Create a new MoyomanPlayer object to resume an existing game. |
protected |
MoyomanPlayer(Color c,
Handicap h,
Mode m,
CommandExecutor ce)
Create a new MoyomanPlayer object. |
Method Summary | |
void |
derivedMakeMove(MoveDescriptor md)
Make a move. |
MoveDescriptor |
derivedRequestMove()
Request a move. |
Debug[] |
getDebuggingInfo(String name,
DebugType[] types)
Get the debug objects for the module type. |
GameRecord |
getGameRecord()
Get a game record from the server. |
String |
getId()
Return the id for this game. |
String |
getIdentifyingInfo()
Return a string which identifies the user. |
short |
getMoveNumber()
Get the move number. |
MoveDescriptor |
getSuggestedMove()
Get the suggested move from the server. |
boolean |
isSelfInitializingUser()
Indicate this this player does not require initialization for loading a game. |
String[] |
listDebuggingModules(DebugType[] types)
The types parameter acts as a filter, so that modules which only have debugging information that the client will not understand are not on the list. |
BooleanResponse |
requestResignation()
Request that the server resigns the game. |
void |
setProperties(Properties props)
Set the properties for this player. |
Methods inherited from class org.moyoman.comm.client.ValidatedPlayer |
isValidatedUser |
Methods inherited from class org.moyoman.comm.client.Player |
getColor, getHandicap, makeMove, makeMoveNoEvents, registerEndOfGameMoveListener, registerMakeMoveListener, registerRequestMoveListener, requestMove, unregisterEndOfGameListeners, unregisterMakeMoveListeners, unregisterRequestMoveListeners |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
String id
CommandExecutor ce
Constructor Detail |
protected MoyomanPlayer(Color c, Handicap h, Mode m, CommandExecutor ce) throws InternalErrorException
c
- - The color of this player.h
- - The handicap for this player.m
- - The mode for this player.ce
- - The CommandExecutor object for this player.
InternalErrorException
- - Thrown if an error occurs for any reason.protected MoyomanPlayer(Color c, Handicap h, CommandExecutor ce, GameId gid) throws InternalErrorException
c
- - The color of this player.h
- - The handicap for this player.ce
- - The CommandExecutor object for this player.gid
- - The id of the game.
InternalExceptionError
- - Thrown if an error occurs for any reason.
InternalErrorException
Method Detail |
public void derivedMakeMove(MoveDescriptor md) throws IllegalMoveException, InternalErrorException
derivedMakeMove
in class Player
md
- The MoveDescriptor which describes the move to make.
Exception
- Thrown if the operation fails.
IllegalMoveException
- - Thrown if the move is illegal.
InternalExceptionError
- - Thrown if an error occurs for any reason.
InternalErrorException
- Thrown if the operation fails for any reason.public MoveDescriptor derivedRequestMove() throws IllegalMoveException, InternalErrorException
derivedRequestMove
in class Player
IllegalMoveException
- - Thrown if the move is illegal.
InternalExceptionError
- - Thrown if an error occurs for any reason.
InternalErrorException
- Thrown if the operation fails for any reason.public Debug[] getDebuggingInfo(String name, DebugType[] types) throws NoSuchDataException, InternalErrorException
name
- - The name of the module.types
- - The debug types which the caller supports.
NoSuchDataException
- - Thrown if the name does not correspond to an actual module.
InternalExceptionError
- - Thrown if an error occurs for any reason.
InternalErrorException
public GameRecord getGameRecord() throws InternalErrorException
getGameRecord
in class Player
InternalErrorException
- Thrown if the operation fails for any reason.public void setProperties(Properties props) throws InternalErrorException
props
- The Properties object. The meaning of the properties
are specific to individual module implementations.
InternalErrorException
- Thrown if the operation fails for any reason.public MoveDescriptor getSuggestedMove() throws Exception
Exception
- Thrown if the operation fails.public String[] listDebuggingModules(DebugType[] types) throws InternalErrorException
types
- A filter which indicates the desired Debug types.
InternalErrorException
- Thrown if the operation fails for any reason.public BooleanResponse requestResignation() throws InternalErrorException
InternalErrorException
- Thrown if the operation fails for any reason.public short getMoveNumber() throws InternalErrorException
getMoveNumber
in class Player
InternalErrorException
- Thrown if the operation fails for any reason.public boolean isSelfInitializingUser()
isSelfInitializingUser
in class Player
public String getIdentifyingInfo()
getIdentifyingInfo
in class Player
public String getId()
getId
in class Player
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |